summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/vfs.h
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-10-03 02:04:31 +0200
committerZach Hilman <zachhilman@gmail.com>2018-10-19 20:02:07 +0200
commita25d79cfaad99e7659a8123d41dc0969e854259b (patch)
treeca5adf2b2f4e944099cbe672c0819d841294d64d /src/core/file_sys/vfs.h
parentMerge pull request #1525 from ogniK5377/block-home (diff)
downloadyuzu-a25d79cfaad99e7659a8123d41dc0969e854259b.tar
yuzu-a25d79cfaad99e7659a8123d41dc0969e854259b.tar.gz
yuzu-a25d79cfaad99e7659a8123d41dc0969e854259b.tar.bz2
yuzu-a25d79cfaad99e7659a8123d41dc0969e854259b.tar.lz
yuzu-a25d79cfaad99e7659a8123d41dc0969e854259b.tar.xz
yuzu-a25d79cfaad99e7659a8123d41dc0969e854259b.tar.zst
yuzu-a25d79cfaad99e7659a8123d41dc0969e854259b.zip
Diffstat (limited to 'src/core/file_sys/vfs.h')
-rw-r--r--src/core/file_sys/vfs.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/core/file_sys/vfs.h b/src/core/file_sys/vfs.h
index 7f0d520ca..09dc9f288 100644
--- a/src/core/file_sys/vfs.h
+++ b/src/core/file_sys/vfs.h
@@ -262,36 +262,8 @@ public:
// item name -> type.
virtual std::map<std::string, VfsEntryType, std::less<>> GetEntries() const;
- // Interprets the file with name file instead as a directory of type directory.
- // The directory must have a constructor that takes a single argument of type
- // std::shared_ptr<VfsFile>. Allows to reinterpret container files (i.e NCA, zip, XCI, etc) as a
- // subdirectory in one call.
- template <typename Directory>
- bool InterpretAsDirectory(std::string_view file) {
- auto file_p = GetFile(file);
-
- if (file_p == nullptr) {
- return false;
- }
-
- return ReplaceFileWithSubdirectory(file_p, std::make_shared<Directory>(file_p));
- }
-
- bool InterpretAsDirectory(const std::function<VirtualDir(VirtualFile)>& function,
- const std::string& file) {
- auto file_p = GetFile(file);
- if (file_p == nullptr)
- return false;
- return ReplaceFileWithSubdirectory(file_p, function(file_p));
- }
-
// Returns the full path of this directory as a string, recursively
virtual std::string GetFullPath() const;
-
-protected:
- // Backend for InterpretAsDirectory.
- // Removes all references to file and adds a reference to dir in the directory's implementation.
- virtual bool ReplaceFileWithSubdirectory(VirtualFile file, VirtualDir dir) = 0;
};
// A convenience partial-implementation of VfsDirectory that stubs out methods that should only work