mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 08:45:45 +00:00
Added DeleteFile and DeleteDirectory functions to FS:USER and the archives.
This commit is contained in:
parent
b66859714b
commit
8aeadbd95a
8 changed files with 194 additions and 26 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue