#include <filesystem.h>
Inheritance diagram for zeitgeist::FileSystem:
Public Types | |
typedef void(* | TCallback )(char *filename, void *param) |
this function defines an interface for a callback, used to iterate over files. | |
Public Member Functions | |
FileSystem () | |
constructs a filesystem | |
virtual | ~FileSystem () |
virtual boost::shared_ptr< salt::RFile > | Open (const std::string &inName)=0 |
tries to open the file named inName. | |
virtual bool | SetPath (const std::string &inPath)=0 |
sets the path all calls to Open are relative to. | |
virtual int | ForEachFile (const std::string &, TCallback callback, void *param)=0 |
iterates over all files managed by this filesystem. | |
Private Member Functions | |
FileSystem (const FileSystem &obj) | |
FileSystem & | operator= (const FileSystem &obj) |
Definition at line 42 of file filesystem.h.
|
this function defines an interface for a callback, used to iterate over files. It used in conjunction with ForEachFile(). Definition at line 51 of file filesystem.h. |
|
constructs a filesystem
Definition at line 58 of file filesystem.h. |
|
Definition at line 59 of file filesystem.h. |
|
|
|
iterates over all files managed by this filesystem. 'directory', 'name' and 'extension' give directory, name and extension a file must match. directory,name and extension may be NULL, in wich case every directory,extension and/or name matches. For each match the function callback is called with the name of the matched file and the additional user parameter 'param'. param is just passed through to the callback and has no meaning to the filesystem. |
|
tries to open the file named inName. Returns an instance of a salt::RFile on success, NULL otherwise Implemented in FileSystemSTD, and FileSystemZIP. |
|
|
|
sets the path all calls to Open are relative to. For a standard file system this call maps directly to a directory. For Filesystems providing access to an archive it is used to select the archive, i.e. it is the filename of an archive. Please refer to concrete Filesystems for an example implementation. Implemented in FileSystemSTD, and FileSystemZIP. |