file_manager.hh
Go to the documentation of this file.
1 #ifndef _FILE_MANAGER_HH_
2 #define _FILE_MANAGER_HH_
3 
4 #include <string>
5 #include <vector>
6 
7 namespace Stg {
8 
9  class FileManager {
10  private:
11  std::string WorldsRoot;
12 
13  std::string stripFilename( const std::string& path );
14  public:
15  FileManager();
16 
18  inline const std::string worldsRoot() const { return WorldsRoot; }
20  inline void newWorld( const std::string& worldfile ) {
21  WorldsRoot = stripFilename( worldfile ); }
22 
24  static bool readable( const std::string& path );
25 
31  static std::string findFile( const std::string& filename );
32 
34  static std::string stagePath();
35  };
36 
37 };
38 #endif