diff options
| -rw-r--r-- | src/core/file_sys/vfs_real.h | 12 |
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 { | |||
| 74 | RealVfsDirectory(RealVfsFilesystem& base, const std::string& path, Mode perms = Mode::Read); | 74 | RealVfsDirectory(RealVfsFilesystem& base, const std::string& path, Mode perms = Mode::Read); |
| 75 | 75 | ||
| 76 | public: | 76 | public: |
| 77 | std::shared_ptr<VfsFile> GetFileRelative(std::string_view path) const override; | ||
| 78 | std::shared_ptr<VfsDirectory> GetDirectoryRelative(std::string_view path) const override; | ||
| 79 | std::shared_ptr<VfsFile> GetFile(std::string_view name) const override; | ||
| 80 | std::shared_ptr<VfsDirectory> GetSubdirectory(std::string_view name) const override; | ||
| 81 | std::shared_ptr<VfsFile> CreateFileRelative(std::string_view path) override; | ||
| 82 | std::shared_ptr<VfsDirectory> CreateDirectoryRelative(std::string_view path) override; | ||
| 83 | bool DeleteSubdirectoryRecursive(std::string_view name) override; | ||
| 77 | std::vector<std::shared_ptr<VfsFile>> GetFiles() const override; | 84 | std::vector<std::shared_ptr<VfsFile>> GetFiles() const override; |
| 78 | std::vector<std::shared_ptr<VfsDirectory>> GetSubdirectories() const override; | 85 | std::vector<std::shared_ptr<VfsDirectory>> GetSubdirectories() const override; |
| 79 | bool IsWritable() const override; | 86 | bool IsWritable() const override; |
| @@ -91,14 +98,15 @@ protected: | |||
| 91 | bool ReplaceFileWithSubdirectory(VirtualFile file, VirtualDir dir) override; | 98 | bool ReplaceFileWithSubdirectory(VirtualFile file, VirtualDir dir) override; |
| 92 | 99 | ||
| 93 | private: | 100 | private: |
| 101 | template <typename T, typename R> | ||
| 102 | std::vector<std::shared_ptr<R>> IterateEntries() const; | ||
| 103 | |||
| 94 | RealVfsFilesystem& base; | 104 | RealVfsFilesystem& base; |
| 95 | std::string path; | 105 | std::string path; |
| 96 | std::string parent_path; | 106 | std::string parent_path; |
| 97 | std::vector<std::string> path_components; | 107 | std::vector<std::string> path_components; |
| 98 | std::vector<std::string> parent_components; | 108 | std::vector<std::string> parent_components; |
| 99 | Mode perms; | 109 | Mode perms; |
| 100 | std::vector<std::shared_ptr<VfsFile>> files; | ||
| 101 | std::vector<std::shared_ptr<VfsDirectory>> subdirectories; | ||
| 102 | }; | 110 | }; |
| 103 | 111 | ||
| 104 | } // namespace FileSys | 112 | } // namespace FileSys |