Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tag: v4.0.1
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (29 sloc) 1.028 kB
#include <string>
#include <vector>
namespace Stg {
class FileManager {
std::string WorldsRoot;
std::string stripFilename( const std::string path );
/// Return the path where the current worldfile was loaded from
inline const std::string worldsRoot() const { return WorldsRoot; }
/// Update the worldfile path
inline void newWorld( const std::string worldfile ) {
WorldsRoot = stripFilename( worldfile ); }
/// Determine whether a file can be opened for reading
static bool readable( const std::string path );
/** 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.
static std::string findFile( const std::string filename );
/// Return the STAGEPATH environment variable
static std::string stagePath();
Jump to Line
Something went wrong with that request. Please try again.