#pragma once #include #include #include #include "fs/ext2/ext2.h" #include "fs/ext2/ext2_block_reader.h" #include "fs/ext2/inode_table.h" class Ext2Driver { public: static glcr::ErrorOr Init(const DenaliInfo& denali_info); glcr::ErrorCode ProbePartition(); glcr::ErrorOr GetInode(uint32_t inode_number); glcr::ErrorOr> ReadDirectory(uint32_t inode_number); glcr::ErrorOr ReadFile(uint64_t inode_number); private: glcr::SharedPtr ext2_reader_; glcr::UniquePtr inode_table_; Ext2Driver(const glcr::SharedPtr& reader, glcr::UniquePtr inode_table) : ext2_reader_(reader), inode_table_(glcr::Move(inode_table)) {} };