summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-11-30 23:44:08 -0500
committerGravatar Lioncash2018-11-30 23:52:56 -0500
commit0ccaaafca30c245330a62bd39519fb05720a0bf2 (patch)
tree7aa182eb3e669774155a0ee9dfdeb766a67e7b28 /src
parentservice/fsp_srv: Implement CleanDirectoryRecursively (diff)
downloadyuzu-0ccaaafca30c245330a62bd39519fb05720a0bf2.tar.gz
yuzu-0ccaaafca30c245330a62bd39519fb05720a0bf2.tar.xz
yuzu-0ccaaafca30c245330a62bd39519fb05720a0bf2.zip
file_sys: Override missing mutating functions to be stubbed out for ReadOnlyVfsDirectory by default
Ensures that read only indeed means read only.
Diffstat (limited to 'src')
-rw-r--r--src/core/file_sys/vfs.cpp20
-rw-r--r--src/core/file_sys/vfs.h5
2 files changed, 25 insertions, 0 deletions
diff --git a/src/core/file_sys/vfs.cpp b/src/core/file_sys/vfs.cpp
index a4a3236f4..e33327ef0 100644
--- a/src/core/file_sys/vfs.cpp
+++ b/src/core/file_sys/vfs.cpp
@@ -453,10 +453,30 @@ std::shared_ptr<VfsFile> ReadOnlyVfsDirectory::CreateFile(std::string_view name)
453 return nullptr; 453 return nullptr;
454} 454}
455 455
456std::shared_ptr<VfsFile> ReadOnlyVfsDirectory::CreateFileAbsolute(std::string_view path) {
457 return nullptr;
458}
459
460std::shared_ptr<VfsFile> ReadOnlyVfsDirectory::CreateFileRelative(std::string_view path) {
461 return nullptr;
462}
463
464std::shared_ptr<VfsDirectory> ReadOnlyVfsDirectory::CreateDirectoryAbsolute(std::string_view path) {
465 return nullptr;
466}
467
468std::shared_ptr<VfsDirectory> ReadOnlyVfsDirectory::CreateDirectoryRelative(std::string_view path) {
469 return nullptr;
470}
471
456bool ReadOnlyVfsDirectory::DeleteSubdirectory(std::string_view name) { 472bool ReadOnlyVfsDirectory::DeleteSubdirectory(std::string_view name) {
457 return false; 473 return false;
458} 474}
459 475
476bool ReadOnlyVfsDirectory::DeleteSubdirectoryRecursive(std::string_view name) {
477 return false;
478}
479
460bool ReadOnlyVfsDirectory::CleanSubdirectoryRecursive(std::string_view name) { 480bool ReadOnlyVfsDirectory::CleanSubdirectoryRecursive(std::string_view name) {
461 return false; 481 return false;
462} 482}
diff --git a/src/core/file_sys/vfs.h b/src/core/file_sys/vfs.h
index 6e1db36f1..e5641b255 100644
--- a/src/core/file_sys/vfs.h
+++ b/src/core/file_sys/vfs.h
@@ -282,7 +282,12 @@ public:
282 bool IsReadable() const override; 282 bool IsReadable() const override;
283 std::shared_ptr<VfsDirectory> CreateSubdirectory(std::string_view name) override; 283 std::shared_ptr<VfsDirectory> CreateSubdirectory(std::string_view name) override;
284 std::shared_ptr<VfsFile> CreateFile(std::string_view name) override; 284 std::shared_ptr<VfsFile> CreateFile(std::string_view name) override;
285 std::shared_ptr<VfsFile> CreateFileAbsolute(std::string_view path) override;
286 std::shared_ptr<VfsFile> CreateFileRelative(std::string_view path) override;
287 std::shared_ptr<VfsDirectory> CreateDirectoryAbsolute(std::string_view path) override;
288 std::shared_ptr<VfsDirectory> CreateDirectoryRelative(std::string_view path) override;
285 bool DeleteSubdirectory(std::string_view name) override; 289 bool DeleteSubdirectory(std::string_view name) override;
290 bool DeleteSubdirectoryRecursive(std::string_view name) override;
286 bool CleanSubdirectoryRecursive(std::string_view name) override; 291 bool CleanSubdirectoryRecursive(std::string_view name) override;
287 bool DeleteFile(std::string_view name) override; 292 bool DeleteFile(std::string_view name) override;
288 bool Rename(std::string_view name) override; 293 bool Rename(std::string_view name) override;