└>Geo::GeoSingleton< GeoFileManager >
The file manager deals with locating resources given a path and a filename.
Paths can be relative to the current executable or absolute.
Name | Description |
---|---|
~GeoSingleton() | Destructor clears singleton pointer. |
AddToPath(const char *, bool) | Add a directory to the path. |
GeoSingleton() | Constructor initialises singleton pointer. |
Get() | Returns a pointer to the singleton instance. |
IsAvailable() | Returns true if the singleton is available. |
PurgePath() | Empty path of all entries. |
RemoveFromPath(const char *) | Removes a directory from the path, if it has already been added. |
SearchInPath(const char *, Geo::GeoFileString &) | Try to find a file. |
Start() | Setup the singleton instance. |
Stop() | Release the singleton instance. |
Name | Description |
---|---|
tClass * m_Singleton = NULL | Pointer to the singleton instance or NULL if not started. |
protected: ~GeoSingleton()
Destructor clears singleton pointer.
public: void AddToPath
(
const char * directory,
bool searchFirst
)
Add a directory to the path.
'searchFirst' specifies whether this directory should be searched before the existing paths, otherwise it will be searched after them.
protected: GeoSingleton()
Constructor initialises singleton pointer.
public: tClass * Get()
Returns a pointer to the singleton instance.
public: bool IsAvailable()
Returns true if the singleton is available.
public: void PurgePath()
Empty path of all entries.
public: bool RemoveFromPath
(
const char * directory
)
Removes a directory from the path, if it has already been added.
Returns true if the directory was found and successfully removed, false otherwise.
public: bool SearchInPath
(
const char * filename,
Geo::GeoFileString & destPath
)
Try to find a file.
[in] | filename | The filename to search for. |
[out] | destPath | Returns the path in destPath. |
True if succeeded, false otherwise.
This always searches in the current directory first. |
public: bool Start()
Setup the singleton instance.
public: void Stop()
Release the singleton instance.