From 45afc15aa6b9b1798a321bc053171deb765d7681 Mon Sep 17 00:00:00 2001 From: archshift Date: Sun, 23 Nov 2014 23:20:04 -0800 Subject: Implemented RenameFile in FS:USER --- src/core/file_sys/archive_sdmc.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core/file_sys/archive_sdmc.cpp') diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp index c2ffcd40d..24bc43a02 100644 --- a/src/core/file_sys/archive_sdmc.cpp +++ b/src/core/file_sys/archive_sdmc.cpp @@ -66,6 +66,16 @@ bool Archive_SDMC::DeleteFile(const FileSys::Path& path) const { return FileUtil::Delete(GetMountPoint() + path.AsString()); } +/** + * Rename a File specified by its path + * @param src_path Source path relative to the archive + * @param dest_path Destination path relative to the archive + * @return Whether rename succeeded + */ +bool Archive_SDMC::RenameFile(const FileSys::Path& src_path, const FileSys::Path& dest_path) const { + return FileUtil::Rename(GetMountPoint() + src_path.AsString(), GetMountPoint() + dest_path.AsString()); +} + /** * Delete a directory specified by its path * @param path Path relative to the archive -- cgit v1.2.3 From e5ff01c2cde0fe903140f0215461a68d4f489132 Mon Sep 17 00:00:00 2001 From: archshift Date: Mon, 24 Nov 2014 01:12:58 -0800 Subject: Implemented RenameDirectory in FS:USER --- src/core/file_sys/archive_sdmc.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core/file_sys/archive_sdmc.cpp') 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 @@ -94,6 +94,16 @@ bool Archive_SDMC::CreateDirectory(const Path& path) const { return FileUtil::CreateDir(GetMountPoint() + path.AsString()); } +/** + * Rename a Directory specified by its path + * @param src_path Source path relative to the archive + * @param dest_path Destination path relative to the archive + * @return Whether rename succeeded + */ +bool Archive_SDMC::RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const { + return FileUtil::Rename(GetMountPoint() + src_path.AsString(), GetMountPoint() + dest_path.AsString()); +} + /** * Open a directory specified by its path * @param path Path relative to the archive -- cgit v1.2.3 From 139a4d91d9e8482d8ceeef591b08ab20b0f7e8ee Mon Sep 17 00:00:00 2001 From: archshift Date: Mon, 24 Nov 2014 15:45:20 -0800 Subject: Updated archive.cpp functions for proper error handling --- src/core/file_sys/archive_sdmc.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/core/file_sys/archive_sdmc.cpp') diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp index c8958a0eb..a740a3d59 100644 --- a/src/core/file_sys/archive_sdmc.cpp +++ b/src/core/file_sys/archive_sdmc.cpp @@ -66,12 +66,6 @@ bool Archive_SDMC::DeleteFile(const FileSys::Path& path) const { return FileUtil::Delete(GetMountPoint() + path.AsString()); } -/** - * Rename a File specified by its path - * @param src_path Source path relative to the archive - * @param dest_path Destination path relative to the archive - * @return Whether rename succeeded - */ bool Archive_SDMC::RenameFile(const FileSys::Path& src_path, const FileSys::Path& dest_path) const { return FileUtil::Rename(GetMountPoint() + src_path.AsString(), GetMountPoint() + dest_path.AsString()); } @@ -94,12 +88,6 @@ bool Archive_SDMC::CreateDirectory(const Path& path) const { return FileUtil::CreateDir(GetMountPoint() + path.AsString()); } -/** - * Rename a Directory specified by its path - * @param src_path Source path relative to the archive - * @param dest_path Destination path relative to the archive - * @return Whether rename succeeded - */ bool Archive_SDMC::RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const { return FileUtil::Rename(GetMountPoint() + src_path.AsString(), GetMountPoint() + dest_path.AsString()); } -- cgit v1.2.3