52 virtual int Read(
void *data,
int bytes);
72 virtual int Write(
const void *data,
int bytes);
82 virtual int Seek(
int offset,
int origin);
147 void Open(
const char *name,
int mode);
173 int _Write(
const void *data,
int bytes);
189 void _ReadAsync(
void *data,
int bytes);
int gAsyncBufSize
Bytes of the buffer of each AsyncFile, from buf_size of the file configuration array.
void AsyncFileInit()
Read the file configuration array.
File of the host or the disc file system, read and written through a buffer with non-blocking I/O.
Definition asyncfile.h:13
virtual bool Eof()
Report whether the position is at the end.
virtual int Seek(int offset, int origin)
Move the position, clamped to the file.
AsyncFile(const char *name, int mode)
Allocate the buffer and open a file.
virtual ~AsyncFile()
Close the file and free the buffer.
virtual bool ReadDone(int *bytes)
Copy buffered bytes of the read ReadAsync() started, refilling the buffer when it runs out.
virtual int Size()
Report the size.
virtual void Flush()
Write the buffer when writing, or refill it when reading.
void Open(const char *name, int mode)
Open a file.
virtual bool ReadAsync(void *data, int bytes)
Start reading bytes, at most up to the end of the file.
virtual bool Fail()
Report whether an operation failed.
virtual int Read(void *data, int bytes)
Read bytes and wait for them.
void Close()
Write out a written file and close it.
virtual int Tell()
Report the position.
virtual int Write(const void *data, int bytes)
Write bytes through the buffer.
virtual int UncompressedSize()
Report the size a .gz file records in its last four bytes, or zero for other files.
Open file of the host or the disc.
Definition file.h:29
Growable text buffer that is also a PrnStream.
Definition string.h:19