file_manager.hh
Go to the documentation of this file.
00001 #ifndef _FILE_MANAGER_HH_
00002 #define _FILE_MANAGER_HH_
00003 
00004 #include <string>
00005 #include <vector>
00006 
00007 namespace Stg {
00008 
00009     class FileManager {
00010     private:
00011         std::string WorldsRoot;
00012 
00013         std::string stripFilename( const std::string& path );
00014     public:
00015         FileManager();
00016 
00018         inline const std::string worldsRoot() const { return WorldsRoot; }
00020         inline void newWorld( const std::string& worldfile ) {
00021             WorldsRoot = stripFilename( worldfile ); }
00022 
00024         static bool readable( const std::string& path );
00025 
00031         static std::string findFile( const std::string& filename );
00032 
00034         static std::string stagePath();
00035     };
00036 
00037 };
00038 #endif