mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Added File:setBuffer/getBuffer, File:flush, and File:getMode.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user