Max OS 0.3
Loading...
Searching...
No Matches
MaxOS::filesystem::format::ext2::Ext2FileSystem Class Referencefinal

Handles the ext2 filesystem operations. More...

#include <ext2.h>

Inheritance diagram for MaxOS::filesystem::format::ext2::Ext2FileSystem:
MaxOS::filesystem::FileSystem

Public Member Functions

 Ext2FileSystem (drivers::disk::Disk *disk, uint32_t partition_offset)
 Construct a new Ext2 File System object.
 
 ~Ext2FileSystem () final
 Destroy the Ext2 File System object and free the root directory.
 
- Public Member Functions inherited from MaxOS::filesystem::FileSystem
virtual ~FileSystem ()
 Destructor for FileSystem, frees the root directory (Which in turn frees all files and subdirectories)
 
Directoryroot_directory ()
 Get the directory at "/".
 
Directoryget_directory (const string &path)
 Get the directory at a given path.
 
bool exists (const string &path)
 Check if a path exists on the filesystem.
 

Additional Inherited Members

- Protected Attributes inherited from MaxOS::filesystem::FileSystem
Directorym_root_directory = nullptr
 The fist directory in the file system (not be confused with the system root)
 

Detailed Description

Handles the ext2 filesystem operations.

Definition at line 456 of file ext2.h.

Constructor & Destructor Documentation

◆ Ext2FileSystem()

Ext2FileSystem::Ext2FileSystem ( drivers::disk::Disk disk,
uint32_t  partition_offset 
)

Construct a new Ext2 File System object.

Parameters
diskThe disk the filesystem exists on
partition_offsetThe partition offset on the disk (in sectors)

Definition at line 1173 of file ext2.cpp.

1174 : m_volume(disk, partition_offset) {
1175
1176 // Create the root directory
1177 m_root_directory = new Ext2Directory(&m_volume, 2, "/");
1179
1180}
virtual void read_from_disk()
read the directory from the disk
Directory * m_root_directory
The fist directory in the file system (not be confused with the system root)
Definition filesystem.h:98
Handles the directory operations on the ext2 filesystem.
Definition ext2.h:420

References MaxOS::filesystem::FileSystem::m_root_directory, and MaxOS::filesystem::Directory::read_from_disk().

◆ ~Ext2FileSystem()

Ext2FileSystem::~Ext2FileSystem ( )
final

Destroy the Ext2 File System object and free the root directory.

Definition at line 1185 of file ext2.cpp.

1185 {
1186 delete m_root_directory;
1187}

References MaxOS::filesystem::FileSystem::m_root_directory.


The documentation for this class was generated from the following files: