FreeNOS
|
Provides a storage device to build filesystems on top. More...
#include <Storage.h>
Public Member Functions | |
Storage () | |
Constructor function. More... | |
virtual | ~Storage () |
Destructor function. More... | |
virtual FileSystem::Result | initialize ()=0 |
Initialize the Storage device. More... | |
virtual FileSystem::Result | read (const u64 offset, void *buffer, const Size size) const =0 |
Read a contiguous set of data. More... | |
virtual FileSystem::Result | write (const u64 offset, void *buffer, const Size size) |
Write a contiguous set of data. More... | |
virtual u64 | capacity () const =0 |
Retrieve maximum storage capacity. More... | |
Storage::Storage | ( | ) |
Constructor function.
Definition at line 21 of file Storage.cpp.
|
virtual |
Destructor function.
Definition at line 25 of file Storage.cpp.
|
pure virtual |
Retrieve maximum storage capacity.
Implemented in FileStorage, BootImageStorage, and BootSymbolStorage.
|
pure virtual |
Initialize the Storage device.
Implemented in BootImageStorage, BootSymbolStorage, and FileStorage.
|
pure virtual |
Read a contiguous set of data.
offset | Offset to start reading from. |
buffer | Output buffer. |
size | Number of bytes to copied. |
Implemented in BootImageStorage, BootSymbolStorage, and FileStorage.
Referenced by LinnFileSystem::getInode(), LinnDirectory::getLinnDirectoryEntry(), LinnFileSystem::getOffsetRange(), LinnFileSystem::LinnFileSystem(), LinnFile::read(), and LinnDirectory::read().
|
virtual |
Write a contiguous set of data.
offset | Offset to start writing to. |
buffer | Input buffer. |
size | Number of bytes to written. |
Reimplemented in FileStorage.
Definition at line 29 of file Storage.cpp.
References FileSystem::NotSupported.