#include <file_manager.hh>
|
static std::string | findFile (const std::string &filename) |
|
static std::string | homeDirectory () |
| Returns the path to the current user's home directory (or empty if not detectable): More...
|
|
static bool | readable (const std::string &path) |
| Determine whether a file can be opened for reading. More...
|
|
static std::string | stagePath () |
| Return the STAGEPATH environment variable. More...
|
|
Definition at line 9 of file file_manager.hh.
◆ FileManager()
Stg::FileManager::FileManager |
( |
| ) |
|
◆ findFile()
std::string Stg::FileManager::findFile |
( |
const std::string & |
filename | ) |
|
|
static |
Search for a file in the current directory, in the prefix/share/stage location, and in the locations specified by the STAGEPATH environment variable. Returns the first match or the original filename if not found.
Definition at line 40 of file file_manager.cc.
◆ homeDirectory()
std::string Stg::FileManager::homeDirectory |
( |
| ) |
|
|
static |
Returns the path to the current user's home directory (or empty if not detectable):
Definition at line 83 of file file_manager.cc.
◆ newWorld()
void Stg::FileManager::newWorld |
( |
const std::string & |
worldfile | ) |
|
◆ readable()
bool Stg::FileManager::readable |
( |
const std::string & |
path | ) |
|
|
static |
Determine whether a file can be opened for reading.
Definition at line 92 of file file_manager.cc.
◆ stagePath()
std::string Stg::FileManager::stagePath |
( |
| ) |
|
|
static |
Return the STAGEPATH environment variable.
Definition at line 31 of file file_manager.cc.
◆ stripFilename()
std::string Stg::FileManager::stripFilename |
( |
const std::string & |
path | ) |
|
|
private |
◆ worldsRoot()
const std::string Stg::FileManager::worldsRoot |
( |
| ) |
const |
|
inline |
Return the path where the current worldfile was loaded from.
Definition at line 19 of file file_manager.hh.
◆ WorldsRoot
std::string Stg::FileManager::WorldsRoot |
|
private |
The documentation for this class was generated from the following files: