Added File:setBuffer/getBuffer, File:flush, and File:getMode.

This commit is contained in:
Alex Szpakowski
2013-06-27 06:26:20 -03:00
parent 186bcae7cb
commit 8fbf43fcc3
6 changed files with 237 additions and 28 deletions
+17 -11
View File
@@ -43,17 +43,6 @@ namespace physfs
class File : public love::filesystem::File
{
private:
// filename
std::string filename;
// PHYSFS File handle.
PHYSFS_file *file;
// The current mode of the file.
Mode mode;
public:
/**
@@ -74,13 +63,30 @@ public:
int64 read(void *dst, int64 size);
bool write(const void *data, int64 size);
bool write(const Data *data, int64 size = ALL);
bool flush();
bool eof();
int64 tell();
bool seek(uint64 pos);
bool setBuffer(BufferMode bufmode, int64 size);
BufferMode getBuffer(int64 &size) const;
Mode getMode() const;
std::string getFilename() const;
std::string getExtension() const;
private:
// filename
std::string filename;
// PHYSFS File handle.
PHYSFS_File *file;
// The current mode of the file.
Mode mode;
BufferMode bufferMode;
int64 bufferSize;
}; // File
} // physfs