Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

VFSManager

View IFilesystem.hpp
1 2 3 4 5 6 7
class IFilesystem
{
void listFiles(const char* path, IStringIterator* it) const = 0;
bool fileExists(const char* path) const = 0;
//return null if file can't be found
IInputStream* openFile(const char* path) const = 0;
};
View IFilesystem.hpp
1 2 3 4 5 6 7 8
class IInputStream
{
int getSize() const = 0;
bool eof() const = 0;
//return number of bytes read
int read(MoaiDataBuffer* buff, int numBytesToRead) = 0;
void seek(int offsetType, int value) = 0;
};
View IFilesystem.hpp
1 2 3 4 5 6 7 8 9 10 11 12 13 14
class VFSManager
{
//Add a filesystem to a stack of managed filesystem
void mountFilesystem(IFileSystem* fs, const char* name);
//Remove a filesystem
void unmountFilesystem(const char* name);
void getMountedFilesystems(IStringIterator* it) const;
//Similar to dir/ls
void listFiles(const char* path, IStringIterator* it) const;
bool fileExists(const char* path) const;
//return null if file can't be found
IInputStream* openFile(const char* path) const;
//Other stuffs
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.