class DirManager


Full nameArts::DirManager
Definition#include <arts/dirmanager.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods

Protected Members


Detailed Description

friend class Dispatcher

Dispatcher

[protected]

DirManagerPrivate * d

d

[protected]

static DirManager * instance

instance

[protected]

 DirManager ()

DirManager

constructor

 ~DirManager ()

~DirManager

destructor

DirManager*  the ()

the

[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:
typethe type of the resource
createspecifies 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.