#include <JFileSystem.h>
Public Member Functions | |
bool | AttachZipFile (const string &zipfile, char *password=NULL) |
void | DetachZipFile () |
bool | OpenFile (const string &filename) |
int | ReadFile (void *buffer, int size) |
int | GetFileSize () |
void | CloseFile () |
void | SetResourceRoot (const string &resourceRoot) |
Static Public Member Functions | |
static JFileSystem * | GetInstance () |
static JFileSystem* JFileSystem::GetInstance | ( | ) | [static] |
Get the singleton instance
bool JFileSystem::AttachZipFile | ( | const string & | zipfile, | |
char * | password = NULL | |||
) |
Attach ZIP archive to the file system.
zipfile | - Name of ZIP archive. | |
password | - Password for the ZIP archive. Default is NULL. |
void JFileSystem::DetachZipFile | ( | ) |
Release the attached ZIP archive.
bool JFileSystem::OpenFile | ( | const string & | filename | ) |
Open file for reading.
int JFileSystem::ReadFile | ( | void * | buffer, | |
int | size | |||
) |
Read data from file.
buffer | - Buffer for reading. | |
size | - Number of bytes to read. |
int JFileSystem::GetFileSize | ( | ) |
Get size of file.
void JFileSystem::CloseFile | ( | ) |
Close file.
void JFileSystem::SetResourceRoot | ( | const string & | resourceRoot | ) |
Set root for all the following file operations
- New root.