summaryrefslogtreecommitdiff
path: root/src/core/file_sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/archive.h8
-rw-r--r--src/core/file_sys/archive_romfs.cpp11
-rw-r--r--src/core/file_sys/archive_romfs.h8
-rw-r--r--src/core/file_sys/archive_sdmc.cpp10
-rw-r--r--src/core/file_sys/archive_sdmc.h8
5 files changed, 45 insertions, 0 deletions
diff --git a/src/core/file_sys/archive.h b/src/core/file_sys/archive.h
index 703742a1f..5ea75361e 100644
--- a/src/core/file_sys/archive.h
+++ b/src/core/file_sys/archive.h
@@ -214,6 +214,14 @@ public:
214 virtual bool CreateDirectory(const Path& path) const = 0; 214 virtual bool CreateDirectory(const Path& path) const = 0;
215 215
216 /** 216 /**
217 * Rename a Directory specified by its path
218 * @param src_path Source path relative to the archive
219 * @param dest_path Destination path relative to the archive
220 * @return Whether rename succeeded
221 */
222 virtual bool RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const = 0;
223
224 /**
217 * Open a directory specified by its path 225 * Open a directory specified by its path
218 * @param path Path relative to the archive 226 * @param path Path relative to the archive
219 * @return Opened directory, or nullptr 227 * @return Opened directory, or nullptr
diff --git a/src/core/file_sys/archive_romfs.cpp b/src/core/file_sys/archive_romfs.cpp
index 5594c5910..d0ca7d380 100644
--- a/src/core/file_sys/archive_romfs.cpp
+++ b/src/core/file_sys/archive_romfs.cpp
@@ -75,6 +75,17 @@ bool Archive_RomFS::CreateDirectory(const Path& path) const {
75} 75}
76 76
77/** 77/**
78 * Rename a Directory specified by its path
79 * @param src_path Source path relative to the archive
80 * @param dest_path Destination path relative to the archive
81 * @return Whether rename succeeded
82 */
83bool Archive_RomFS::RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const {
84 ERROR_LOG(FILESYS, "Attempted to rename a file within ROMFS.");
85 return false;
86}
87
88/**
78 * Open a directory specified by its path 89 * Open a directory specified by its path
79 * @param path Path relative to the archive 90 * @param path Path relative to the archive
80 * @return Opened directory, or nullptr 91 * @return Opened directory, or nullptr
diff --git a/src/core/file_sys/archive_romfs.h b/src/core/file_sys/archive_romfs.h
index d14372a01..222bdc356 100644
--- a/src/core/file_sys/archive_romfs.h
+++ b/src/core/file_sys/archive_romfs.h
@@ -66,6 +66,14 @@ public:
66 bool CreateDirectory(const Path& path) const override; 66 bool CreateDirectory(const Path& path) const override;
67 67
68 /** 68 /**
69 * Rename a Directory specified by its path
70 * @param src_path Source path relative to the archive
71 * @param dest_path Destination path relative to the archive
72 * @return Whether rename succeeded
73 */
74 bool RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const override;
75
76 /**
69 * Open a directory specified by its path 77 * Open a directory specified by its path
70 * @param path Path relative to the archive 78 * @param path Path relative to the archive
71 * @return Opened directory, or nullptr 79 * @return Opened directory, or nullptr
diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp
index 24bc43a02..c8958a0eb 100644
--- a/src/core/file_sys/archive_sdmc.cpp
+++ b/src/core/file_sys/archive_sdmc.cpp
@@ -95,6 +95,16 @@ bool Archive_SDMC::CreateDirectory(const Path& path) const {
95} 95}
96 96
97/** 97/**
98 * Rename a Directory specified by its path
99 * @param src_path Source path relative to the archive
100 * @param dest_path Destination path relative to the archive
101 * @return Whether rename succeeded
102 */
103bool Archive_SDMC::RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const {
104 return FileUtil::Rename(GetMountPoint() + src_path.AsString(), GetMountPoint() + dest_path.AsString());
105}
106
107/**
98 * Open a directory specified by its path 108 * Open a directory specified by its path
99 * @param path Path relative to the archive 109 * @param path Path relative to the archive
100 * @return Opened directory, or nullptr 110 * @return Opened directory, or nullptr
diff --git a/src/core/file_sys/archive_sdmc.h b/src/core/file_sys/archive_sdmc.h
index 0dbed987b..19f563a62 100644
--- a/src/core/file_sys/archive_sdmc.h
+++ b/src/core/file_sys/archive_sdmc.h
@@ -70,6 +70,14 @@ public:
70 bool CreateDirectory(const Path& path) const override; 70 bool CreateDirectory(const Path& path) const override;
71 71
72 /** 72 /**
73 * Rename a Directory specified by its path
74 * @param src_path Source path relative to the archive
75 * @param dest_path Destination path relative to the archive
76 * @return Whether rename succeeded
77 */
78 bool RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const override;
79
80 /**
73 * Open a directory specified by its path 81 * Open a directory specified by its path
74 * @param path Path relative to the archive 82 * @param path Path relative to the archive
75 * @return Opened directory, or nullptr 83 * @return Opened directory, or nullptr