summaryrefslogtreecommitdiffstats
path: root/src/common/file_util.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-12-09 09:22:16 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-12-09 09:42:03 +0100
commit532983437616e15539b448594a360c138995e282 (patch)
tree2537197bb02dfce45dbc55933cabfa06a1b5bc25 /src/common/file_util.h
parentcommon/file_util: Succeed on CreateDir when the directory exists (diff)
downloadyuzu-532983437616e15539b448594a360c138995e282.tar
yuzu-532983437616e15539b448594a360c138995e282.tar.gz
yuzu-532983437616e15539b448594a360c138995e282.tar.bz2
yuzu-532983437616e15539b448594a360c138995e282.tar.lz
yuzu-532983437616e15539b448594a360c138995e282.tar.xz
yuzu-532983437616e15539b448594a360c138995e282.tar.zst
yuzu-532983437616e15539b448594a360c138995e282.zip
Diffstat (limited to '')
-rw-r--r--src/common/file_util.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/file_util.h b/src/common/file_util.h
index c2ee7ca27..cf006cc9d 100644
--- a/src/common/file_util.h
+++ b/src/common/file_util.h
@@ -54,8 +54,14 @@ enum class UserPath {
// Returns true if successful, or path already exists.
bool CreateDir(const std::filesystem::path& path);
-// Creates the full path of path. Returns true on success
-bool CreateFullPath(const std::filesystem::path& path);
+// Create all directories in path
+// Returns true if successful, or path already exists.
+[[nodiscard("Directory creation can fail and must be tested")]] bool CreateDirs(
+ const std::filesystem::path& path);
+
+// Creates directories in path. Returns true on success.
+[[deprecated("This function is deprecated, use CreateDirs")]] bool CreateFullPath(
+ const std::filesystem::path& path);
// Deletes a given file at the path.
// This will also delete empty directories.