]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/filesys.h
Merge branch 'master' of https://github.com/minetest/minetest
[dragonfireclient.git] / src / filesys.h
index 41395320cf23648624d7e03a7d24e5f51651af24..cfbfa02bfa0fa13563440781fd4f20497fca5c8e 100644 (file)
@@ -80,11 +80,10 @@ std::vector<std::string> GetRecursiveDirs(const std::string &dir);
    list files - include files in the list of subpaths.
    ignore - paths that start with these charcters will not be listed.
 */
-void GetRecursiveSubPaths(const std::string &path, std::vector<std::string> &dst,
-               bool list_files, const std::set<char> &ignore = {});
-
-// Tries to delete all, returns false if any failed
-bool DeletePaths(const std::vector<std::string> &paths);
+void GetRecursiveSubPaths(const std::string &path,
+                 std::vector<std::string> &dst,
+                 bool list_files,
+                 const std::set<char> &ignore = {});
 
 // Only pass full paths to this one. True on success.
 bool RecursiveDeleteContent(const std::string &path);
@@ -108,8 +107,8 @@ bool PathStartsWith(const std::string &path, const std::string &prefix);
 // returns "" if there is only one path component.
 // removed: If non-NULL, receives the removed component(s).
 // count: Number of components to remove
-std::string RemoveLastPathComponent(
-               const std::string &path, std::string *removed = NULL, int count = 1);
+std::string RemoveLastPathComponent(const std::string &path,
+               std::string *removed = NULL, int count = 1);
 
 // Remove "." and ".." path components and for every ".." removed, remove
 // the last normal path component before it. Unlike AbsolutePath,
@@ -126,6 +125,8 @@ const char *GetFilenameFromPath(const char *path);
 
 bool safeWriteToFile(const std::string &path, const std::string &content);
 
+bool ReadFile(const std::string &path, std::string &out);
+
 bool Rename(const std::string &from, const std::string &to);
 
 } // namespace fs