G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsFileManager.h
Go to the documentation of this file.
1 
14 #pragma once
15 
17 
18 namespace gismo
19 {
20 
35 class GISMO_EXPORT gsFileManager
36 {
37 public:
38 
40  static char getNativePathSeparator();
41 
43  static const std::string& getValidPathSeparators();
44 
46  static const std::string& getInvalidCharacters();
47 
52  static bool isFullyQualified(const std::string& fn);
53 
58  static bool isExplicitlyRelative(const std::string& fn);
59 
62  static bool setSearchPaths(const std::string& paths);
63 
66  static bool addSearchPaths(const std::string& paths);
67 
69  static std::string getSearchPaths();
70 
87  static std::string find(std::string fn);
88 
100  static bool fileExists(const std::string& name);
101 
111  static std::string findInDataDir(std::string fn);
112 
114  static bool fileExistsInDataDir(const std::string& name);
115 
117  static std::string getTempPath();
118 
120  static std::string getCurrentPath();
121 
123  static std::string getExePath();
124 
126  static std::string getHomePath();
127 
135  static std::string makeRelative(const std::string& from, const std::string& to);
136 
144  static bool mkdir( std::string fn );
145 
151  static bool pathEqual( const std::string& p1, const std::string& p2 );
152 
154  static std::string getExtension(std::string const & fn);
155 
157  static std::string getBasename(std::string const & fn);
158 
160  static std::string getFilename(std::string const & fn);
161 
165  static std::string getPath(std::string const & fn, bool resolve = false);
166 
181  static std::string getCanonicRepresentation(const std::string & fn, bool asPath = false);
182 
184  static void open(const std::string & fn);
185 
186 };
187 
188 
189 } // namespace gismo
Provides forward declarations of types and structs.
File-system related functionality.
Definition: gsFileManager.h:35