![]() |
Max OS 0.3
|
Handles the disk operations and file system information. More...
#include <filesystem.h>
Public Member Functions | |
| virtual | ~FileSystem () |
| Destructor for FileSystem, frees the root directory (Which in turn frees all files and subdirectories) | |
| Directory * | root_directory () |
| Get the directory at "/". | |
| Directory * | get_directory (const string &path) |
| Get the directory at a given path. | |
| bool | exists (const string &path) |
| Check if a path exists on the filesystem. | |
Protected Attributes | |
| Directory * | m_root_directory = nullptr |
| The fist directory in the file system (not be confused with the system root) | |
Handles the disk operations and file system information.
Definition at line 96 of file filesystem.h.
|
virtual |
Destructor for FileSystem, frees the root directory (Which in turn frees all files and subdirectories)
Definition at line 285 of file filesystem.cpp.
References m_root_directory.
Check if a path exists on the filesystem.
| path | The path to check |
Definition at line 342 of file filesystem.cpp.
References MaxOS::filesystem::Path::file_name(), MaxOS::filesystem::Path::file_path(), get_directory(), and MaxOS::filesystem::Directory::open_file().
Get the directory at a given path.
| path | The path to the directory |
Definition at line 307 of file filesystem.cpp.
References MaxOS::filesystem::Directory::open_subdirectory(), root_directory(), and MaxOS::filesystem::Path::top_directory().
Referenced by exists().
| Directory * FileSystem::root_directory | ( | ) |
Get the directory at "/".
Definition at line 297 of file filesystem.cpp.
References m_root_directory.
Referenced by get_directory().
|
protected |
The fist directory in the file system (not be confused with the system root)
Definition at line 98 of file filesystem.h.
Referenced by MaxOS::filesystem::format::ext2::Ext2FileSystem::Ext2FileSystem(), MaxOS::filesystem::format::Fat32FileSystem::Fat32FileSystem(), root_directory(), MaxOS::filesystem::format::ext2::Ext2FileSystem::~Ext2FileSystem(), and ~FileSystem().