![]() |
Public API Reference |
![]() |
A helper class containing a number of functions to deal with Crystal Space installation paths. More...
#include <csutil/syspath.h>
Static Public Member Functions | |
static csRef< iStringArray > | FindSystemRoots () |
Get the list of root directories. | |
static csString | GetAppDir (const char *argv0) |
Return the directory in which the application executable resides. | |
static csString | GetAppFilename (const char *basename) |
Constructs an executable filename given a basename. | |
static csString | GetAppPath (const char *argv0) |
Return the absolute path of the executable. | |
static csPathsList * | GetPlatformInstallationPaths () |
Return one or more paths which themselves or whose subdirectories can contain CrystalSpace-related resources, plugins as well as common data and configuration. | |
static csPathsList * | GetPluginPaths (const char *argv0) |
Get a list of directories where plugins are installed. | |
static csString | GetResourceDir (const char *argv0) |
Return the directory in which the application's resources reside. |
A helper class containing a number of functions to deal with Crystal Space installation paths.
static csRef<iStringArray> csInstallationPathsHelper::FindSystemRoots | ( | ) | [static] |
Get the list of root directories.
For instance in Unix it simply returns '/' but for Windows it may return a list of available drive letters.
static csString csInstallationPathsHelper::GetAppDir | ( | const char * | argv0 | ) | [static] |
Return the directory in which the application executable resides.
For MacOS/X, returns the directory in which the Cocoa application wrapper resides.
argv0 | The first element of the argv[] array passed to main(). On many platforms, this is the only way to determine the actual location of the executable. |
static csString csInstallationPathsHelper::GetAppFilename | ( | const char * | basename | ) | [static] |
Constructs an executable filename given a basename.
static csString csInstallationPathsHelper::GetAppPath | ( | const char * | argv0 | ) | [static] |
Return the absolute path of the executable.
For MacOS/X, returns the absolute path of the executable within the Cocoa application wrapper.
argv0 | The first element of the argv[] array passed to main(). On many platforms, this is the only way to determine the actual location of the executable. |
static csPathsList* csInstallationPathsHelper::GetPlatformInstallationPaths | ( | ) | [static] |
Return one or more paths which themselves or whose subdirectories can contain CrystalSpace-related resources, plugins as well as common data and configuration.
There's no guarantee that any entry actually contains some useable resource; it's up to the caller to check what resources are available and to pick the appropriate entries for some purpose.
static csPathsList* csInstallationPathsHelper::GetPluginPaths | ( | const char * | argv0 | ) | [static] |
Get a list of directories where plugins are installed.
static csString csInstallationPathsHelper::GetResourceDir | ( | const char * | argv0 | ) | [static] |
Return the directory in which the application's resources reside.
On many platforms, resources (such as plugin modules) reside in the same directory as the application itself. The default implementation returns the same value as csGetAppPath(), however platforms may want to override the default implementation if this behavior is unsuitable. For example, on MacOS/X, for GUI applications, resources reside in the "Resources" directory within the Cocoa application wrapper.
argv0 | The first element of the argv[] array passed to main(). On many platforms, this is the only way to determine the actual location of the resources. |