60 int Read(
void *pBuffer,
int nBytes)
override;
82 int Write(
const void *pBuffer,
int nBytes)
override;
93 int Seek(
int nOffset,
int nOrigin)
override;
123 return mTell == mSize;
156 return mUncompressedSize;
177 void Open(
const char *pszFile,
int nMode);
195 static void FreeDescriptor();
204 int OpenDescriptor();
215 int WriteDescriptor(
const void *pBuffer,
int nBytes);
223 void SeekDescriptor();
233 void ReadDescriptor(
void *pBuffer,
int nBytes);
242 bool DescriptorDone();
250 void CloseDescriptor();
255 int mUncompressedSize;
int Seek(int nOffset, int nOrigin) override
Move the position, clamped to the file, and refill the buffer of a file opened to read.
AsyncFile(const char *pszFile, int nMode)
Allocate the buffer and open a file.
static void Init()
Read the buf_size setting of the file block of the system configuration.
bool ReadAsync(void *pBuffer, int nBytes) override
Start reading bytes.
int Write(const void *pBuffer, int nBytes) override
Write bytes into the buffer, writing out each full buffer.
~AsyncFile() override
Close the file and release the buffer.
int Tell() override
Report the position.
Definition asyncfile.h:102
bool Fail() override
Report whether an operation failed.
Definition asyncfile.h:133
int UncompressedSize() override
Report the size before compression.
Definition asyncfile.h:155
void Open(const char *pszFile, int nMode)
Open a file, and read the size before compression of a .gz file opened to read.
int Size() override
Report the size.
Definition asyncfile.h:144
bool ReadDone(int *pnBytes) override
Copy what the buffer has of the read, refilling the buffer when the read needs more.
void Flush() override
Write out the buffer of a file opened to write, or start refilling the buffer of a file opened to rea...
int Read(void *pBuffer, int nBytes) override
Read bytes and wait for them.
void Close()
Write out the buffer of a file opened to write, close the file, and reset the state.
bool Eof() override
Report whether the position is at the end.
Definition asyncfile.h:122
static void Terminate()
Shut the file layer down.
Open file of the host or the disc.
Definition file.h:29
Growable text buffer that is also a PrnStream.
Definition string.h:19