]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/filesys.h
Drop luaentity_common.h which is not included anywhere
[dragonfireclient.git] / src / filesys.h
index 7560d3c1524f3969af17e1c4c9e387cf29714d15..94d0c874dec6611e34c946b4d2ad40161ca06072 100644 (file)
@@ -28,10 +28,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define DIR_DELIM "\\"
 #define DIR_DELIM_CHAR '\\'
 #define FILESYS_CASE_INSENSITIVE 1
+#define PATH_DELIM ";"
 #else // POSIX
 #define DIR_DELIM "/"
 #define DIR_DELIM_CHAR '/'
 #define FILESYS_CASE_INSENSITIVE 0
+#define PATH_DELIM ":"
 #endif
 
 namespace fs
@@ -103,13 +105,19 @@ std::string RemoveLastPathComponent(const std::string &path,
 // this does not resolve symlinks and check for existence of directories.
 std::string RemoveRelativePathComponents(std::string path);
 
-// Return the filename from a path or the entire path if no directory delimiter
-// is found.
+// Returns the absolute path for the passed path, with "." and ".." path
+// components and symlinks removed.  Returns "" on error.
+std::string AbsolutePath(const std::string &path);
+
+// Returns the filename from a path or the entire path if no directory
+// delimiter is found.
 const char *GetFilenameFromPath(const char *path);
 
 bool safeWriteToFile(const std::string &path, const std::string &content);
 
-}//fs
+bool Rename(const std::string &from, const std::string &to);
+
+} // namespace fs
 
 #endif