#include <CATFileSystem.h>
Use CATPlatform::GetFileSystem() to acquire, and CATPlatform::Release() to release.
Filesystem functions should be threadsafed using fFSLock.
You must call Initialize() after receiving a file system from CATPlatform.
Definition at line 33 of file CATFileSystem.h.
Public Member Functions | |
virtual CATResult | Initialize ()=0 |
virtual CATResult | FileExists (const CATString &pathname)=0 |
virtual CATResult | DirExists (const CATString &pathname)=0 |
virtual CATResult | CreateDir (const CATString &pathname)=0 |
virtual CATResult | PathExists (const CATString &pathname)=0 |
virtual CATResult | FindFirst (const CATString &searchMask, CATString &firstFile, CATFINDHANDLE &findHandle)=0 |
virtual CATResult | FindNext (CATString &nextFile, CATFINDHANDLE findHandle)=0 |
virtual CATResult | FindEnd (CATFINDHANDLE &findHandle)=0 |
virtual CATResult | OpenFile (const CATString &filename, CATStream::OPEN_MODE mode, CATStream *&stream)=0 |
virtual CATResult | OpenCachedFile (const CATString &filename, CATStream *&stream) |
virtual CATResult | ReleaseFile (CATStream *&stream)=0 |
virtual bool | IsFileReadOnly (const CATString &path)=0 |
CATString | GetFullPath (const CATString &path) |
virtual CATString | GetBase () |
GetBase() retrieves the base path of the system. | |
Static Public Member Functions | |
static CATString | BuildPath (const CATString &directory, const CATString &filename, bool appendSep=false) |
static CATString & | EnsureTerminator (CATString &termPath) |
static CATString | GetFileExtension (const CATString &path) |
static CATString | StripFileExtension (const CATString &path) |
StripFileExtension() returns the string w/o any file extension. | |
static CATString | SanitizeFilename (const CATString &filename, bool allowExtSep=true, bool allowPathSep=false, bool allowDriveSep=false) |
static CATResult | SplitPath (const CATString &fullPath, CATString &directory, CATString &filename, bool keepTrailingSep=true) |
Protected Member Functions | |
CATFileSystem (const CATString &basePath="") | |
virtual | ~CATFileSystem () |
Destructor. | |
CATString | RemoveBasePath (CATString &fullPath) |
Remove fBasePath from a full path and return result. | |
Protected Attributes | |
CATMutex | fFSLock |
CATString | fBasePath |
Private Attributes | |
friend | CATPlatform |