24 bool open(
const Path& filename);
25 bool is_open()
const {
return file !=
nullptr; }
29 bool seek(
long offset, seekdir origin)
override;
37 size_t read(
void* buffer,
size_t size)
override;
An interface for a stream of data.
bool seek(long offset, seekdir origin) override
Change the pointer of the stream to a given position.
long size() override
Computes the size of the file.
int getc() override
Read one byte from the stream.
size_t read(void *buffer, size_t size) override
Read data from the stream.
long tell() override
Return the current position of the stream pointer.
Wrapper around POSIX file io, same as ifstream but without iostream formatting.