Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
Stg::FileManager Class Reference

#include <file_manager.hh>

List of all members.

Public Member Functions

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

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.
static std::string stagePath ()
 Return the STAGEPATH environment variable.

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

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 Thu Aug 27 2015 15:20:57