mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-11 21:07:56 -05:00
Implemented RenameDirectory in FS:USER
This commit is contained in:
@ -213,6 +213,14 @@ public:
|
||||
*/
|
||||
virtual bool CreateDirectory(const Path& path) const = 0;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
virtual bool RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const = 0;
|
||||
|
||||
/**
|
||||
* Open a directory specified by its path
|
||||
* @param path Path relative to the archive
|
||||
|
@ -74,6 +74,17 @@ bool Archive_RomFS::CreateDirectory(const Path& path) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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_RomFS::RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const {
|
||||
ERROR_LOG(FILESYS, "Attempted to rename a file within ROMFS.");
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a directory specified by its path
|
||||
* @param path Path relative to the archive
|
||||
|
@ -65,6 +65,14 @@ public:
|
||||
*/
|
||||
bool CreateDirectory(const Path& path) const override;
|
||||
|
||||
/**
|
||||
* 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 RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const override;
|
||||
|
||||
/**
|
||||
* Open a directory specified by its path
|
||||
* @param path Path relative to the archive
|
||||
|
@ -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
|
||||
|
@ -69,6 +69,14 @@ public:
|
||||
*/
|
||||
bool CreateDirectory(const Path& path) const override;
|
||||
|
||||
/**
|
||||
* 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 RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const override;
|
||||
|
||||
/**
|
||||
* Open a directory specified by its path
|
||||
* @param path Path relative to the archive
|
||||
|
Reference in New Issue
Block a user