Torque::FS Namespace Reference


Classes

class  FileBase
 Base class for all FileIO objects. More...
class  FileNode
 Base class for objects in a FileSystem. More...
class  File
 File object in a FileSystem. More...
class  Directory
 Directory in a FileSystem. More...
class  FileSystemChangeNotifier
class  FileSystem
 Collection of FileNode objects. More...
class  MountSystem

File System Access

Functions for mounting file systems and dealing with files and directories. The kernel provides FileSystem mounting, the concept of a current working directory as well as relative paths.

bool Mount (String root, FileSystemRef fs)
 Mount file system.
bool Mount (String root, const Path &path)
 Mount file system redirect.
FileSystemRef Unmount (String root)
 Remove mounted file system.
FileSystemRef GetFileSystem (const Path &file)
 Find the the file system which owns the given file.
FileNodeRef GetFileNode (const Path &path)
 Find the file system node for the given file.
bool MapFSPath (const String &inRoot, const Path &inPath, Path &outPath)
 Map a real file system path to a virtual one based on a root.
S32 FindByPattern (const Path &inBasePath, const String &inFilePattern, bool inRecursive, Vector< String > &outList)
 Find files matching a pattern starting in a given dir.
bool SetCwd (const Path &file)
 Set current working directory.
const PathGetCwd ()
 Get the current working directory.
bool Remove (const Path &file)
 Remove (or delete) a file from the file system.
bool Rename (const Path &from, const Path &to)
 Rename a file or directory.
bool GetFileAttributes (const Path &path, FileNode::Attributes *attr)
 Get the file attributes.
FileRef OpenFile (const Path &file, File::AccessMode mode)
 Open a file.
bool ReadFile (const Path &inPath, void *&outData, U32 &outSize, bool inNullTerminate=false)
 Read in an entire file.
DirectoryRef OpenDirectory (const Path &file)
 Open a directory.
FileRef CreateFile (const Path &file)
 Create a file.
DirectoryRef CreateDirectory (const Path &file)
 Create a directory.
bool CreatePath (const Path &path)
 Create all the directories in the path if they don't already exist.
bool IsReadOnly (const Path &path)
bool IsDirectory (const Path &path)
bool IsFile (const Path &path)
void StartFileChangeNotifications ()
void StopFileChangeNotifications ()
S32 GetNumMounts ()
String GetMountRoot (S32 index)
String GetMountPath (S32 index)
String GetMountType (S32 index)

Typedefs

typedef WeakRefPtr< FileNodeFileNodePtr
typedef StrongRefPtr< FileNodeFileNodeRef
typedef WeakRefPtr< FileFilePtr
typedef StrongRefPtr< FileFileRef
typedef WeakRefPtr< DirectoryDirectoryPtr
typedef StrongRefPtr< DirectoryDirectoryRef
typedef WeakRefPtr< FileSystemFileSystemPtr
typedef StrongRefPtr< FileSystemFileSystemRef


Typedef Documentation