summaryrefslogtreecommitdiff
path: root/src/core/file_sys/vfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/file_sys/vfs.h')
-rw-r--r--src/core/file_sys/vfs.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/core/file_sys/vfs.h b/src/core/file_sys/vfs.h
index 141a053ce..3bbc361ba 100644
--- a/src/core/file_sys/vfs.h
+++ b/src/core/file_sys/vfs.h
@@ -15,9 +15,9 @@
15 15
16namespace FileSys { 16namespace FileSys {
17 17
18struct VfsFilesystem; 18class VfsDirectory;
19struct VfsFile; 19class VfsFile;
20struct VfsDirectory; 20class VfsFilesystem;
21 21
22// Convenience typedefs to use Vfs* interfaces 22// Convenience typedefs to use Vfs* interfaces
23using VirtualFilesystem = std::shared_ptr<VfsFilesystem>; 23using VirtualFilesystem = std::shared_ptr<VfsFilesystem>;
@@ -34,7 +34,8 @@ enum class VfsEntryType {
34// A class representing an abstract filesystem. A default implementation given the root VirtualDir 34// A class representing an abstract filesystem. A default implementation given the root VirtualDir
35// is provided for convenience, but if the Vfs implementation has any additional state or 35// is provided for convenience, but if the Vfs implementation has any additional state or
36// functionality, they will need to override. 36// functionality, they will need to override.
37struct VfsFilesystem : NonCopyable { 37class VfsFilesystem : NonCopyable {
38public:
38 VfsFilesystem(VirtualDir root); 39 VfsFilesystem(VirtualDir root);
39 virtual ~VfsFilesystem(); 40 virtual ~VfsFilesystem();
40 41
@@ -81,7 +82,8 @@ protected:
81}; 82};
82 83
83// A class representing a file in an abstract filesystem. 84// A class representing a file in an abstract filesystem.
84struct VfsFile : NonCopyable { 85class VfsFile : NonCopyable {
86public:
85 virtual ~VfsFile(); 87 virtual ~VfsFile();
86 88
87 // Retrieves the file name. 89 // Retrieves the file name.
@@ -179,7 +181,8 @@ struct VfsFile : NonCopyable {
179}; 181};
180 182
181// A class representing a directory in an abstract filesystem. 183// A class representing a directory in an abstract filesystem.
182struct VfsDirectory : NonCopyable { 184class VfsDirectory : NonCopyable {
185public:
183 virtual ~VfsDirectory(); 186 virtual ~VfsDirectory();
184 187
185 // Retrives the file located at path as if the current directory was root. Returns nullptr if 188 // Retrives the file located at path as if the current directory was root. Returns nullptr if
@@ -295,7 +298,8 @@ protected:
295 298
296// A convenience partial-implementation of VfsDirectory that stubs out methods that should only work 299// A convenience partial-implementation of VfsDirectory that stubs out methods that should only work
297// if writable. This is to avoid redundant empty methods everywhere. 300// if writable. This is to avoid redundant empty methods everywhere.
298struct ReadOnlyVfsDirectory : public VfsDirectory { 301class ReadOnlyVfsDirectory : public VfsDirectory {
302public:
299 bool IsWritable() const override; 303 bool IsWritable() const override;
300 bool IsReadable() const override; 304 bool IsReadable() const override;
301 std::shared_ptr<VfsDirectory> CreateSubdirectory(std::string_view name) override; 305 std::shared_ptr<VfsDirectory> CreateSubdirectory(std::string_view name) override;