![]() |
CloudBuilder C++ SDK
v3.0.0
Making social games is easy !
|
#include <CFilesystem.h>
Public Member Functions | |
| bool | Delete (const char *aRelativePath) |
| CInputFile * | OpenFileForReading (const char *aRelativeName) |
| COutputFile * | OpenFileForWriting (const char *aRelativeName) |
| void | SetFilesystemHandler (CFilesystemHandler *aHandler, bool aDeleteAutomatically=true) |
| CotCHelpers::CHJSON * | ReadJson (const char *aRelativeName) |
| bool | WriteJson (const char *aRelativeName, const CotCHelpers::CHJSON *aJSON) |
Static Public Member Functions | |
| static CFilesystemManager * | Instance () |
Friends | |
| struct | singleton_holder< CFilesystemManager > |
| void | CClan::Setup (const CotCHelpers::CHJSON *, CResultHandler *) |
| void | CClan::Terminate () |
File system manager, allowing to write and read files. This class is used by the system but users may also have access to it. You can pass a custom file system handler in order to customize how and where files are written on your system.
| bool CloudBuilder::CFilesystemManager::Delete | ( | const char * | aRelativePath | ) |
Deletes a file.
| aRelativePath | file name. |
|
static |
| CInputFile* CloudBuilder::CFilesystemManager::OpenFileForReading | ( | const char * | aRelativeName | ) |
Opens a file for input.
| aRelativeName | file name. |
| COutputFile* CloudBuilder::CFilesystemManager::OpenFileForWriting | ( | const char * | aRelativeName | ) |
Opens a file for output.
| aRelativeName | file name. |
| CotCHelpers::CHJSON* CloudBuilder::CFilesystemManager::ReadJson | ( | const char * | aRelativeName | ) |
Reads a JSON persisted to the storage.
| aRelativeName | file name. |
| void CloudBuilder::CFilesystemManager::SetFilesystemHandler | ( | CFilesystemHandler * | aHandler, |
| bool | aDeleteAutomatically = true |
||
| ) |
Allows to replace the file system handler. You can use that if you want to persist data in a special fashion, such as in RAM.
| aHandler | handler to use from now on. |
| aDeleteAutomatically | whether to delete this instance when no longer used. |
1.8.15