mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 19:17:57 -05:00
Added DeleteFile and DeleteDirectory functions to FS:USER and the archives.
This commit is contained in:
@ -57,6 +57,24 @@ std::unique_ptr<File> Archive_SDMC::OpenFile(const Path& path, const Mode mode)
|
||||
return std::unique_ptr<File>(file);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
Reference in New Issue
Block a user