#pragma once
+#include <set>
#include <string>
#include <vector>
#include "exceptions.h"
// Returns path to temp directory, can return "" on error
std::string TempPath();
-/* Multiplatform */
+/* Returns a list of subdirectories, including the path itself, but excluding
+ hidden directories (whose names start with . or _)
+*/
+void GetRecursiveDirs(std::vector<std::string> &dirs, const std::string &dir);
+std::vector<std::string> GetRecursiveDirs(const std::string &dir);
-// The path itself not included
-void GetRecursiveSubPaths(const std::string &path, std::vector<std::string> &dst);
+/* Multiplatform */
-// Tries to delete all, returns false if any failed
-bool DeletePaths(const std::vector<std::string> &paths);
+/* The path itself not included, returns a list of all subpaths.
+ dst - vector that contains all the subpaths.
+ 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 = {});
// Only pass full paths to this one. True on success.
bool RecursiveDeleteContent(const std::string &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