VFSFilefile; //initialized somewhere beforeautoinput = file.input;
with(input)
{
autobuffer = newubyte[32];
//Read the first 32 bytes from the file:read(buffer);
//Read the next 32 bytes:read(buffer);
//Read the last 32 bytes in the file:seek(-32, file);
read(buffer);
}
Provides basic file input functionality - seeking and reading.
VFSFileInput uses reference counting so that the file is closed when the last instance of VFSFileInput provided by the file is destroyed.