summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-08-03 17:52:42 +0200
committerZach Hilman <zachhilman@gmail.com>2018-08-09 03:18:45 +0200
commit656e97df16944dd997e18a58829001008760bf01 (patch)
tree7f3614ced150ef4be73c978e67cc1a23cccd38f4
parentfile_sys: Add missing include in savedata_factory (diff)
downloadyuzu-656e97df16944dd997e18a58829001008760bf01.tar
yuzu-656e97df16944dd997e18a58829001008760bf01.tar.gz
yuzu-656e97df16944dd997e18a58829001008760bf01.tar.bz2
yuzu-656e97df16944dd997e18a58829001008760bf01.tar.lz
yuzu-656e97df16944dd997e18a58829001008760bf01.tar.xz
yuzu-656e97df16944dd997e18a58829001008760bf01.tar.zst
yuzu-656e97df16944dd997e18a58829001008760bf01.zip
-rw-r--r--src/core/file_sys/vfs_real.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/file_sys/vfs_real.h b/src/core/file_sys/vfs_real.h
index dbb381a2a..8a1e79ef6 100644
--- a/src/core/file_sys/vfs_real.h
+++ b/src/core/file_sys/vfs_real.h
@@ -74,6 +74,13 @@ class RealVfsDirectory : public VfsDirectory {
RealVfsDirectory(RealVfsFilesystem& base, const std::string& path, Mode perms = Mode::Read);
public:
+ std::shared_ptr<VfsFile> GetFileRelative(std::string_view path) const override;
+ std::shared_ptr<VfsDirectory> GetDirectoryRelative(std::string_view path) const override;
+ std::shared_ptr<VfsFile> GetFile(std::string_view name) const override;
+ std::shared_ptr<VfsDirectory> GetSubdirectory(std::string_view name) const override;
+ std::shared_ptr<VfsFile> CreateFileRelative(std::string_view path) override;
+ std::shared_ptr<VfsDirectory> CreateDirectoryRelative(std::string_view path) override;
+ bool DeleteSubdirectoryRecursive(std::string_view name) override;
std::vector<std::shared_ptr<VfsFile>> GetFiles() const override;
std::vector<std::shared_ptr<VfsDirectory>> GetSubdirectories() const override;
bool IsWritable() const override;
@@ -91,14 +98,15 @@ protected:
bool ReplaceFileWithSubdirectory(VirtualFile file, VirtualDir dir) override;
private:
+ template <typename T, typename R>
+ std::vector<std::shared_ptr<R>> IterateEntries() const;
+
RealVfsFilesystem& base;
std::string path;
std::string parent_path;
std::vector<std::string> path_components;
std::vector<std::string> parent_components;
Mode perms;
- std::vector<std::shared_ptr<VfsFile>> files;
- std::vector<std::shared_ptr<VfsDirectory>> subdirectories;
};
} // namespace FileSys