Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Stg::FileManager Class Reference

#include <file_manager.hh>

Public Member Functions

 FileManager ()
 
void newWorld (const std::string &worldfile)
 Update the worldfile path. More...
 
const std::string worldsRoot () const
 Return the path where the current worldfile was loaded from. More...
 

Static Public Member Functions

static std::string findFile (const std::string &filename)
 
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...
 

Private Member Functions

std::string stripFilename (const std::string &path)
 

Private Attributes

std::string WorldsRoot
 

Detailed Description

Definition at line 9 of file file_manager.hh.

Constructor & Destructor Documentation

Stg::FileManager::FileManager ( )

Definition at line 25 of file file_manager.cc.

Member Function Documentation

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 36 of file file_manager.cc.

void Stg::FileManager::newWorld ( const std::string &  worldfile)
inline

Update the worldfile path.

Definition at line 20 of file file_manager.hh.

bool Stg::FileManager::readable ( const std::string &  path)
static

Determine whether a file can be opened for reading.

Definition at line 68 of file file_manager.cc.

std::string Stg::FileManager::stagePath ( )
static

Return the STAGEPATH environment variable.

Definition at line 28 of file file_manager.cc.

std::string Stg::FileManager::stripFilename ( const std::string &  path)
private

Definition at line 80 of file file_manager.cc.

const std::string Stg::FileManager::worldsRoot ( ) const
inline

Return the path where the current worldfile was loaded from.

Definition at line 18 of file file_manager.hh.

Member Data Documentation

std::string Stg::FileManager::WorldsRoot
private

Definition at line 11 of file file_manager.hh.


The documentation for this class was generated from the following files:


stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Mon Jun 10 2019 15:06:12