FileDevice.h
Go to the documentation of this file.
40 FileDevice(const String& name, IFS::IFileSystem& fileSys, IFS::FileHandle file, storage_size_t size)
static constexpr FileSystem & cast(IFileSystem &fs)
Definition: Components/IFS/src/include/IFS/FileSystem.h:42
String getName() const override
Obtain unique device name.
Definition: FileDevice.h:101
bool read(storage_size_t address, void *buffer, size_t len) override
Read data from the storage device.
storage_size_t getSize() const override
Obtain addressable size of this device.
Definition: FileDevice.h:111
FileDevice(const String &name, IFS::IFileSystem &fileSys, IFS::FileHandle file, storage_size_t size)
Construct a file device with custom size.
Definition: FileDevice.h:74
Type
Storage type.
Definition: Components/Storage/src/include/Storage/Device.h:42
Class to manage a NUL-terminated C-style string When storing persistent strings in RAM the regular St...
Definition: CString.h:26
bool write(storage_size_t address, const void *data, size_t len) override
Write data to the storage device.
Definition: FileDevice.h:25
const char * c_str() const
Get a constant (un-modifiable) pointer to String content.
Definition: WString.h:616
size_t getBlockSize() const override
Obtain smallest allocation unit for erase operations.
Definition: FileDevice.h:116
Represents a storage device (e.g. flash memory)
Definition: Components/Storage/src/include/Storage/Device.h:33
Type getType() const override
Obtain device type.
Definition: FileDevice.h:106
bool erase_range(storage_size_t address, storage_size_t len) override
Erase a region of storage in preparation for writing.