diff options
Diffstat (limited to 'src/core/file_sys/vfs.h')
-rw-r--r-- | src/core/file_sys/vfs.h | 28 |
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 |