Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATFileSystem Class Reference

CATFileSystem Class Reference

#include <CATFileSystem.h>

Inheritance diagram for CATFileSystem:

CATFileSystem_Win32

List of all members.


Detailed Description

File utility virtual interface.

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 CATStringEnsureTerminator (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

The documentation for this class was generated from the following file:
Generated on Mon Feb 11 04:10:28 2008 for Game Accessibility Suite by doxygen 1.5.4