3#include "common/config.h"
7#include "physfs/physfs.h"
23 File(std::string filename);
31 bool open(std::string mode)
override;
33 bool close()
override;
35 bool isOpen()
const override;
39 int64_t
read(
void *dst, int64_t
size)
override;
41 bool write(
const void *data, int64_t
size)
override;
43 bool flush()
override;
45 bool isEOF()
override;
47 int64_t
tell()
override;
49 bool seek(uint64_t
pos)
override;
55 std::string
getMode()
const override;
69 std::string bufferMode;
A File interface, providing generic means of reading from and writing to files.
virtual FileData * read(int64_t size=ALL)
Reads data from the file and allocates a Data object.
virtual bool write(const void *data, int64_t size)=0
Writes data into the File.
bool isEOF() override
True when eof.
std::string getFilename() const override
Full filename including extension.
std::string getMode() const override
Returns the mode.
bool close() override
Closes close.
bool open(std::string mode) override
Opens open.
bool seek(uint64_t pos) override
Seeks seek.
bool setBuffer(std::string bufmode, int64_t size) override
Sets the buffer.
virtual ~File()
Releases File resources.
bool write(const void *data, int64_t size) override
Writes write.
int64_t read(void *dst, int64_t size) override
Reads read.
bool flush() override
Flushes flush.
int64_t getSize() override
Byte length of the owned buffer.
int64_t tell() override
Returns the current tell.
bool isOpen() const override
True when open.
std::string getBuffer(int64_t &size) const override
Returns the buffer.
Build metadata (engine git commit, build time, third-party version).