DDraceNetwork Docs
IStorage Class Referenceabstract

#include <storage.h>

Inheritance diagram for IStorage:
[legend]
Collaboration diagram for IStorage:
[legend]

Public Types

enum  {
  TYPE_SAVE = 0 , TYPE_ALL = -1 , TYPE_ABSOLUTE = -2 , TYPE_SAVE_OR_ABSOLUTE = -3 ,
  TYPE_ALL_OR_ABSOLUTE = -4 , STORAGETYPE_BASIC = 0 , STORAGETYPE_SERVER , STORAGETYPE_CLIENT
}
 

Public Member Functions

virtual int NumPaths () const =0
 
virtual void ListDirectory (int Type, const char *pPath, FS_LISTDIR_CALLBACK pfnCallback, void *pUser)=0
 
virtual void ListDirectoryInfo (int Type, const char *pPath, FS_LISTDIR_CALLBACK_FILEINFO pfnCallback, void *pUser)=0
 
virtual IOHANDLE OpenFile (const char *pFilename, int Flags, int Type, char *pBuffer=nullptr, int BufferSize=0)=0
 
virtual bool FileExists (const char *pFilename, int Type)=0
 
virtual bool FolderExists (const char *pFilename, int Type)=0
 
virtual bool ReadFile (const char *pFilename, int Type, void **ppResult, unsigned *pResultLen)=0
 
virtual char * ReadFileStr (const char *pFilename, int Type)=0
 
virtual bool RetrieveTimes (const char *pFilename, int Type, time_t *pCreated, time_t *pModified)=0
 
virtual bool CalculateHashes (const char *pFilename, int Type, SHA256_DIGEST *pSha256, unsigned *pCrc=nullptr)=0
 
virtual bool FindFile (const char *pFilename, const char *pPath, int Type, char *pBuffer, int BufferSize)=0
 
virtual size_t FindFiles (const char *pFilename, const char *pPath, int Type, std::set< std::string > *pEntries)=0
 
virtual bool RemoveFile (const char *pFilename, int Type)=0
 
virtual bool RemoveFolder (const char *pFilename, int Type)=0
 
virtual bool RenameFile (const char *pOldFilename, const char *pNewFilename, int Type)=0
 
virtual bool CreateFolder (const char *pFoldername, int Type)=0
 
virtual void GetCompletePath (int Type, const char *pDir, char *pBuffer, unsigned BufferSize)=0
 
virtual bool RemoveBinaryFile (const char *pFilename)=0
 
virtual bool RenameBinaryFile (const char *pOldFilename, const char *pNewFilename)=0
 
virtual const char * GetBinaryPath (const char *pFilename, char *pBuffer, unsigned BufferSize)=0
 
virtual const char * GetBinaryPathAbsolute (const char *pFilename, char *pBuffer, unsigned BufferSize)=0
 
- Public Member Functions inherited from IInterface
 IInterface ()
 
virtual void Shutdown ()
 
virtual ~IInterface ()
 

Static Public Member Functions

static const char * InterfaceName ()
 
static void StripPathAndExtension (const char *pFilename, char *pBuffer, int BufferSize)
 
static const char * FormatTmpPath (char *aBuf, unsigned BufSize, const char *pPath)
 

Additional Inherited Members

- Protected Member Functions inherited from IInterface
IKernelKernel ()
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
TYPE_SAVE 
TYPE_ALL 
TYPE_ABSOLUTE 
TYPE_SAVE_OR_ABSOLUTE 

Translates to TYPE_SAVE if a path is relative and to TYPE_ABSOLUTE if a path is absolute. Only usable with OpenFile, ReadFile, ReadFileStr, GetCompletePath, FileExists and FolderExists.

TYPE_ALL_OR_ABSOLUTE 

Translates to TYPE_ALL if a path is relative and to TYPE_ABSOLUTE if a path is absolute. Only usable with OpenFile, ReadFile, ReadFileStr, GetCompletePath, FileExists and FolderExists.

STORAGETYPE_BASIC 
STORAGETYPE_SERVER 
STORAGETYPE_CLIENT 

Member Function Documentation

◆ CalculateHashes()

virtual bool IStorage::CalculateHashes ( const char *  pFilename,
int  Type,
SHA256_DIGEST pSha256,
unsigned *  pCrc = nullptr 
)
pure virtual

Implemented in CStorage.

◆ CreateFolder()

virtual bool IStorage::CreateFolder ( const char *  pFoldername,
int  Type 
)
pure virtual

Implemented in CStorage.

◆ FileExists()

virtual bool IStorage::FileExists ( const char *  pFilename,
int  Type 
)
pure virtual

Implemented in CStorage.

◆ FindFile()

virtual bool IStorage::FindFile ( const char *  pFilename,
const char *  pPath,
int  Type,
char *  pBuffer,
int  BufferSize 
)
pure virtual

Implemented in CStorage.

◆ FindFiles()

virtual size_t IStorage::FindFiles ( const char *  pFilename,
const char *  pPath,
int  Type,
std::set< std::string > *  pEntries 
)
pure virtual

Implemented in CStorage.

◆ FolderExists()

virtual bool IStorage::FolderExists ( const char *  pFilename,
int  Type 
)
pure virtual

Implemented in CStorage.

◆ FormatTmpPath()

const char * IStorage::FormatTmpPath ( char *  aBuf,
unsigned  BufSize,
const char *  pPath 
)
static

◆ GetBinaryPath()

virtual const char * IStorage::GetBinaryPath ( const char *  pFilename,
char *  pBuffer,
unsigned  BufferSize 
)
pure virtual

Implemented in CStorage.

◆ GetBinaryPathAbsolute()

virtual const char * IStorage::GetBinaryPathAbsolute ( const char *  pFilename,
char *  pBuffer,
unsigned  BufferSize 
)
pure virtual

Implemented in CStorage.

◆ GetCompletePath()

virtual void IStorage::GetCompletePath ( int  Type,
const char *  pDir,
char *  pBuffer,
unsigned  BufferSize 
)
pure virtual

Implemented in CStorage.

◆ InterfaceName()

static const char * IStorage::InterfaceName ( )
inlinestatic

◆ ListDirectory()

virtual void IStorage::ListDirectory ( int  Type,
const char *  pPath,
FS_LISTDIR_CALLBACK  pfnCallback,
void *  pUser 
)
pure virtual

Implemented in CStorage.

◆ ListDirectoryInfo()

virtual void IStorage::ListDirectoryInfo ( int  Type,
const char *  pPath,
FS_LISTDIR_CALLBACK_FILEINFO  pfnCallback,
void *  pUser 
)
pure virtual

Implemented in CStorage.

◆ NumPaths()

virtual int IStorage::NumPaths ( ) const
pure virtual

Implemented in CStorage.

◆ OpenFile()

virtual IOHANDLE IStorage::OpenFile ( const char *  pFilename,
int  Flags,
int  Type,
char *  pBuffer = nullptr,
int  BufferSize = 0 
)
pure virtual

Implemented in CStorage.

◆ ReadFile()

virtual bool IStorage::ReadFile ( const char *  pFilename,
int  Type,
void **  ppResult,
unsigned *  pResultLen 
)
pure virtual

Implemented in CStorage.

◆ ReadFileStr()

virtual char * IStorage::ReadFileStr ( const char *  pFilename,
int  Type 
)
pure virtual

Implemented in CStorage.

◆ RemoveBinaryFile()

virtual bool IStorage::RemoveBinaryFile ( const char *  pFilename)
pure virtual

Implemented in CStorage.

◆ RemoveFile()

virtual bool IStorage::RemoveFile ( const char *  pFilename,
int  Type 
)
pure virtual

Implemented in CStorage.

◆ RemoveFolder()

virtual bool IStorage::RemoveFolder ( const char *  pFilename,
int  Type 
)
pure virtual

Implemented in CStorage.

◆ RenameBinaryFile()

virtual bool IStorage::RenameBinaryFile ( const char *  pOldFilename,
const char *  pNewFilename 
)
pure virtual

Implemented in CStorage.

◆ RenameFile()

virtual bool IStorage::RenameFile ( const char *  pOldFilename,
const char *  pNewFilename,
int  Type 
)
pure virtual

Implemented in CStorage.

◆ RetrieveTimes()

virtual bool IStorage::RetrieveTimes ( const char *  pFilename,
int  Type,
time_t *  pCreated,
time_t *  pModified 
)
pure virtual

Implemented in CStorage.

◆ StripPathAndExtension()

void IStorage::StripPathAndExtension ( const char *  pFilename,
char *  pBuffer,
int  BufferSize 
)
static

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