LittleFileSystem
|
LittleFileSystem class provides a high-level interface for LittleFS file system operations. More...
#include <LittleFileSystem.h>
Public Member Functions | |
LittleFileSystem () | |
Default constructor. | |
~LittleFileSystem () | |
Destructor. | |
bool | Begin (bool formatOnFail=false, const char *basePath="/littlefs", const char *partitionLabel="spiffs") |
bool | Format () const |
size_t | TotalBytes () const |
size_t | UsedBytes () const |
void | End () const |
Unmount the file system. | |
![]() | |
FileSystem (FileSystemPtr impl) | |
FileStream | Open (const char *path, const char *mode=FILE_READ, bool create=false) const |
FileStream | Open (const String &path, const char *mode=FILE_READ, bool create=false) const |
bool | Exists (const char *path) const |
bool | Exists (const String &path) const |
bool | Remove (const char *path) const |
bool | Remove (const String &path) const |
bool | Rename (const char *pathFrom, const char *pathTo) const |
bool | Rename (const String &pathFrom, const String &pathTo) const |
bool | CreateDirectory (const char *path) const |
bool | CreateDirectory (const String &path) const |
bool | RemoveDirectory (const char *path) const |
bool | RemoveDirectory (const String &path) const |
const char * | Mountpoint () const |
Additional Inherited Members | |
![]() | |
FileSystemPtr | _impl |
Shared pointer to an IFileSystem object. | |
LittleFileSystem class provides a high-level interface for LittleFS file system operations.
LittleFileSystem::LittleFileSystem | ( | ) |
Default constructor.
LittleFileSystem::~LittleFileSystem | ( | ) |
Destructor.
bool LittleFileSystem::Begin | ( | bool | formatOnFail = false, |
const char * | basePath = "/littlefs", | ||
const char * | partitionLabel = "spiffs" ) |
Initialize the file system
formatOnFail | - whether to format the file system if initialization fails (default is false) |
basePath | - base path for the file system (default is "/littlefs") |
partitionLabel | - label for the partition (default is "spiffs") |
void LittleFileSystem::End | ( | ) | const |
Unmount the file system.
bool LittleFileSystem::Format | ( | ) | const |
Format the file system
size_t LittleFileSystem::TotalBytes | ( | ) | const |
Get the total size of the file system
size_t LittleFileSystem::UsedBytes | ( | ) | const |
Get the used size of the file system