aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/file_sys/archive_sdmc.cpp
diff options
context:
space:
mode:
authorGravatar archshift <admin@archshift.com>2014-11-11 10:37:26 -0800
committerGravatar archshift <admin@archshift.com>2014-11-23 00:33:43 -0800
commit8aeadbd95a85e2d42d282897d7d286d645d61f27 (patch)
tree5cc15bf131a6cfb3e6a0834e07ca2d007f612a7e /src/core/file_sys/archive_sdmc.cpp
parentb66859714bda5968e36fed47a2ff8516bcfd2248 (diff)
Added DeleteFile and DeleteDirectory functions to FS:USER and the archives.
Diffstat (limited to 'src/core/file_sys/archive_sdmc.cpp')
-rw-r--r--src/core/file_sys/archive_sdmc.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp
index ecdb7f21..c2ffcd40 100644
--- a/src/core/file_sys/archive_sdmc.cpp
+++ b/src/core/file_sys/archive_sdmc.cpp
@@ -58,6 +58,24 @@ std::unique_ptr<File> Archive_SDMC::OpenFile(const Path& path, const Mode mode)
}
/**
+ * Delete a file specified by its path
+ * @param path Path relative to the archive
+ * @return Whether the file could be deleted
+ */
+bool Archive_SDMC::DeleteFile(const FileSys::Path& path) const {
+ return FileUtil::Delete(GetMountPoint() + path.AsString());
+}
+
+/**
+ * Delete a directory specified by its path
+ * @param path Path relative to the archive
+ * @return Whether the directory could be deleted
+ */
+bool Archive_SDMC::DeleteDirectory(const FileSys::Path& path) const {
+ return FileUtil::DeleteDir(GetMountPoint() + path.AsString());
+}
+
+/**
* Create a directory specified by its path
* @param path Path relative to the archive
* @return Whether the directory could be created