summaryrefslogtreecommitdiff
path: root/src/filesys.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-26 00:21:38 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-03-26 08:36:59 +0300
commit5b31d32da8b1dc8b5e60b495bdfc20a563487cc7 (patch)
tree5287415aa1e80d443932bda29d1d67312592a0a5 /src/filesys.h
parentdcef5183f7c2a12f7bd4990bc9a3fe9d27bef55b (diff)
downloadminetest-5b31d32da8b1dc8b5e60b495bdfc20a563487cc7.tar.gz
minetest-5b31d32da8b1dc8b5e60b495bdfc20a563487cc7.tar.bz2
minetest-5b31d32da8b1dc8b5e60b495bdfc20a563487cc7.zip
Better file/directory removal platform code and utilities
Diffstat (limited to 'src/filesys.h')
-rw-r--r--src/filesys.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/filesys.h b/src/filesys.h
index 8bf43c3fa..07c18e446 100644
--- a/src/filesys.h
+++ b/src/filesys.h
@@ -40,24 +40,35 @@ struct DirListNode
std::string name;
bool dir;
};
-
std::vector<DirListNode> GetDirListing(std::string path);
// Returns true if already exists
bool CreateDir(std::string path);
-// Create all directories on the given path that don't already exist.
-bool CreateAllDirs(std::string path);
-
bool PathExists(std::string path);
+bool IsDir(std::string path);
+
// Only pass full paths to this one. True on success.
// NOTE: The WIN32 version returns always true.
bool RecursiveDelete(std::string path);
+bool DeleteSingleFileOrEmptyDirectory(std::string path);
+
+/* Multiplatform */
+
+// The path itself not included
+void GetRecursiveSubPaths(std::string path, std::vector<std::string> &dst);
+
+// Tries to delete all, returns false if any failed
+bool DeletePaths(const std::vector<std::string> &paths);
+
// Only pass full paths to this one. True on success.
bool RecursiveDeleteContent(std::string path);
+// Create all directories on the given path that don't already exist.
+bool CreateAllDirs(std::string path);
+
}//fs
#endif