diff options
author | bunnei <bunneidev@gmail.com> | 2014-11-24 02:02:23 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-11-24 02:02:23 +0100 |
commit | ef1b16a7eb3da11d18e68521ddd996e8f48f3aa1 (patch) | |
tree | 5562cdcd5eaa63021832dab60abfbb2756533838 /src/core/file_sys/archive_sdmc.cpp | |
parent | Merge pull request #220 from yuriks/patch-1 (diff) | |
parent | Added DeleteFile and DeleteDirectory functions to FS:USER and the archives. (diff) | |
download | yuzu-ef1b16a7eb3da11d18e68521ddd996e8f48f3aa1.tar yuzu-ef1b16a7eb3da11d18e68521ddd996e8f48f3aa1.tar.gz yuzu-ef1b16a7eb3da11d18e68521ddd996e8f48f3aa1.tar.bz2 yuzu-ef1b16a7eb3da11d18e68521ddd996e8f48f3aa1.tar.lz yuzu-ef1b16a7eb3da11d18e68521ddd996e8f48f3aa1.tar.xz yuzu-ef1b16a7eb3da11d18e68521ddd996e8f48f3aa1.tar.zst yuzu-ef1b16a7eb3da11d18e68521ddd996e8f48f3aa1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/archive_sdmc.cpp | 18 |
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 ecdb7f211..c2ffcd40d 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 |