Public Methods
- DirManager ()
- ~DirManager ()
- std::string locate (const std::string& type, const std::string& filename)
- std::vector<std::string> * locateAll (const std::string& type,
const std::string& extension="",
bool recursive = false)
- std::string saveLocation (const std::string& type, bool create = true)
Public Static Methods
- static DirManager* the ()
Protected Members
| friend class Dispatcher
| Dispatcher |
[protected]
[protected]
| static DirManager * instance
| instance |
[protected]
constructor
~DirManager ()
| ~DirManager |
destructor
[static]
returns an instance
std::string locate (const std::string& type, const std::string& filename)
| locate |
This finds a specified resource, for instance
DirManager::the()->locate("samples","pong.wav")
DirManager::the()->locate("structures","stereo_beep.arts")
|
would try to find a sample named pong.wav (or a structure named
stereo_beep.arts) in the usual directories.
std::vector<std::string> * locateAll (const std::string& type,
const std::string& extension="",
bool recursive = false)
| locateAll |
This is like locate, but returns all possible matches with a given
extension, i.e.
DirManager::the()->locateAll("samples","wav")
|
would return all samples that have a wav extension.
std::string saveLocation (const std::string& type, bool create = true)
| saveLocation |
This returns a directory where to save resources of a given type to.
Parameters:
| type | the type of the resource
|
| create | specifies whether the directory should be created
|
Returns: the directory to save the file to (with a / appended), or
nothing at all, if no writeable directory could be created
| Generated by: stefan on stefan on Sat Jun 2 23:13:28 2001, using kdoc 2.0a53. |