CloudBuilder  2.8.4
Making social games is easy !
Public Member Functions | Static Public Member Functions | Friends | List of all members
CloudBuilder::CFilesystemManager Class Reference

#include <CFilesystem.h>

Public Member Functions

bool Delete (const char *aRelativePath)
 
CInputFileOpenFileForReading (const char *aRelativeName)
 
COutputFileOpenFileForWriting (const char *aRelativeName)
 
void SetFilesystemHandler (CFilesystemHandler *aHandler, bool aDeleteAutomatically=true)
 
CotCHelpers::CHJSONReadJson (const char *aRelativeName)
 
bool WriteJson (const char *aRelativeName, const CotCHelpers::CHJSON *aJSON)
 

Static Public Member Functions

static CFilesystemManagerInstance ()
 

Friends

struct singleton_holder< CFilesystemManager >
 
void CClan::Setup (const CotCHelpers::CHJSON *, CResultHandler *)
 
void CClan::Terminate ()
 

Detailed Description

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.

Member Function Documentation

bool CloudBuilder::CFilesystemManager::Delete ( const char *  aRelativePath)

Deletes a file.

Parameters
aRelativePathfile name.
Returns
whether the deletion succeeded.
static CFilesystemManager* CloudBuilder::CFilesystemManager::Instance ( )
static
Returns
a static instance of this manager.
CInputFile* CloudBuilder::CFilesystemManager::OpenFileForReading ( const char *  aRelativeName)

Opens a file for input.

Parameters
aRelativeNamefile name.
Returns
an input file – may not actually be opened (check isOpen()).
COutputFile* CloudBuilder::CFilesystemManager::OpenFileForWriting ( const char *  aRelativeName)

Opens a file for output.

Parameters
aRelativeNamefile name.
Returns
an output file – may not actually be writable (check isOpen()).
CotCHelpers::CHJSON* CloudBuilder::CFilesystemManager::ReadJson ( const char *  aRelativeName)

Reads a JSON persisted to the storage.

Parameters
relativeNamefile name.
Returns
a JSON that you need to delete.
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.

Parameters
aHandlerhandler to use from now on.
aDeleteAutomaticallywhether to delete this instance when no longer used.

The documentation for this class was generated from the following file: