]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Utils/Folders.hpp
Update copyright year to 2017
[lugaru.git] / Source / Utils / Folders.hpp
index 9ecf9e0219eb47395c0d2ea449ed4b3abcbcc48a..c50ab6d3d8c3c0fa787501b2f95c1f07b2b942bf 100644 (file)
@@ -1,6 +1,6 @@
 /*
 Copyright (C) 2003, 2010 - Wolfire Games
-Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
+Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file)
 
 This file is part of Lugaru.
 
@@ -30,7 +30,7 @@ along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 struct FileNotFoundException: public std::exception
 {
     std::string errorText;
-    
+
     FileNotFoundException (const std::string& filename)
     : errorText(filename + " could not be found")
     {}
@@ -56,6 +56,8 @@ public:
 
     static FILE* openMandatoryFile(const std::string& filename, const char* mode);
 
+    static bool file_exists(const std::string& filepath);
+
     /* Returns full path for a game resource */
     static inline std::string getResourcePath(const std::string& filepath)
     { return dataDir + '/' + filepath; }
@@ -64,10 +66,11 @@ public:
     static inline std::string getUserSavePath()
     { return getUserDataPath() + "/users"; }
 
+    static bool makeDirectory(const std::string& path);
+
 private:
     static const char* getHomeDirectory();
     static std::string getGenericDirectory(const char* ENVVAR, const std::string& fallback);
-    static bool makeDirectory(const std::string& path);
 };
 
 #endif /* _FOLDERS_H_ */