class Geo::GeoFileManager
└>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.
Functions
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. |
Variables
Name | Description |
---|---|
tClass * m_Singleton = NULL | Pointer to the singleton instance or NULL if not started. |
Anchor | ||||
---|---|---|---|---|
|
Geo::GeoSingleton< tClass >::~GeoSingleton
...
protected: ~GeoSingleton()
...
Destructor clears singleton pointer.
Anchor | ||||
---|---|---|---|---|
|
void Geo::GeoFileManager::AddToPath
...
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.
Anchor | ||||
---|---|---|---|---|
|
Geo::GeoSingleton< tClass >::GeoSingleton
...
protected: GeoSingleton()
...
Constructor initialises singleton pointer.
Anchor | ||||
---|---|---|---|---|
|
tClass * Geo::GeoSingleton< tClass >::Get
...
public: tClass * Get()
...
Returns a pointer to the singleton instance.
Anchor | ||||
---|---|---|---|---|
|
bool Geo::GeoSingleton< tClass >::IsAvailable
...
public: bool IsAvailable()
...
Returns true if the singleton is available.
Anchor | ||||
---|---|---|---|---|
|
void Geo::GeoFileManager::PurgePath
...
public: void PurgePath()
...
Empty path of all entries.
Anchor | ||||
---|---|---|---|---|
|
bool Geo::GeoFileManager::RemoveFromPath
...
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.
Anchor | ||||
---|---|---|---|---|
|
bool Geo::GeoFileManager::SearchInPath
...
public: bool SearchInPath
(
const char * filename,
Geo::GeoFileString & destPath
)
...
Try to find a file.
Parameters
[in] | filename | The filename to search for. |
[out] | destPath | Returns the path in destPath. |
Returns
True if succeeded, false otherwise.
Note | ||
---|---|---|
| ||
This always searches in the current directory first. |
Anchor | ||||
---|---|---|---|---|
|
bool Geo::GeoSingleton< tClass >::Start
...
public: bool Start()
...
Setup the singleton instance.
Anchor | ||||
---|---|---|---|---|
|
void Geo::GeoSingleton< tClass >::Stop
...
public: void Stop()
...
Release the singleton instance.