From 656e97df16944dd997e18a58829001008760bf01 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Fri, 3 Aug 2018 11:52:42 -0400 Subject: vfs: Use RealVfsFilesystem for fs-operations in RealVfsDirectory --- src/core/file_sys/vfs_real.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/core/file_sys') 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 GetFileRelative(std::string_view path) const override; + std::shared_ptr GetDirectoryRelative(std::string_view path) const override; + std::shared_ptr GetFile(std::string_view name) const override; + std::shared_ptr GetSubdirectory(std::string_view name) const override; + std::shared_ptr CreateFileRelative(std::string_view path) override; + std::shared_ptr CreateDirectoryRelative(std::string_view path) override; + bool DeleteSubdirectoryRecursive(std::string_view name) override; std::vector> GetFiles() const override; std::vector> GetSubdirectories() const override; bool IsWritable() const override; @@ -91,14 +98,15 @@ protected: bool ReplaceFileWithSubdirectory(VirtualFile file, VirtualDir dir) override; private: + template + std::vector> IterateEntries() const; + RealVfsFilesystem& base; std::string path; std::string parent_path; std::vector path_components; std::vector parent_components; Mode perms; - std::vector> files; - std::vector> subdirectories; }; } // namespace FileSys -- cgit v1.2.3