diff options
Diffstat (limited to 'Source/Kernel/VFS/FileSystem.proto.h')
-rw-r--r-- | Source/Kernel/VFS/FileSystem.proto.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/Source/Kernel/VFS/FileSystem.proto.h b/Source/Kernel/VFS/FileSystem.proto.h index a614c13..172c82c 100644 --- a/Source/Kernel/VFS/FileSystem.proto.h +++ b/Source/Kernel/VFS/FileSystem.proto.h @@ -5,17 +5,26 @@ class FSNode; class FileNode; class DirectoryNode; +class FileSystem; + +namespace VFS { + bool unmount(FileSystem*); +} //This abstract class describes a filesystem class FileSystem { + friend bool VFS::unmount(FileSystem*); + private: + String m_identifier; + protected: - virtual ~FileSystem() {} + virtual ~FileSystem(); bool m_isWritable; //false = read only DirectoryNode* m_rootNode; - public: - bool unmount(); + virtual bool unmount() = 0; //Sync data with the disk + public: bool isWritable() { return m_isWritable; } DirectoryNode* getRootNode() { return m_rootNode; } @@ -34,6 +43,10 @@ class FileSystem { virtual FileNode* createFile(DirectoryNode* parent, String name) = 0; virtual DirectoryNode* createDirectory(DirectoryNode* parent, String name) = 0; virtual bool remove(DirectoryNode* parent, FSNode* node) = 0; + + virtual Partition* getPart() = 0; + void setIdentifier(String s) { m_identifier = s; } + String getIdentifier() { return m_identifier; } }; #endif |