We provide the posix file operations with the help of the SD library. For the ESP32 we set up a virtual file system. More...
#include <FileSystemSD.h>
Public Member Functions | |
FileSystemSD (const char *name, ES_SD &sd) | |
FileSystemSD (const char *name) | |
void | setSD (ES_SD &sd) |
void | setFileSystemForSearch () |
Selects the actual File System to be used for directory searches. | |
int | open (const char *path, int flags, int mode) override |
ssize_t | write (int fd, const void *data, size_t size) override |
ssize_t | read (int fd, void *data, size_t size) override |
int | close (int fd) override |
int | fstat (int fd, struct stat *st) override |
int | stat (const char *path, struct stat *st) override |
off_t | lseek (int fd, off_t offset, int mode) override |
DIR * | opendir (const char *path) override |
dirent * | readdir (DIR *dir) override |
int | closedir (DIR *pdir) override |
virtual const char * | name () override |
![]() | |
FileSystemBase (const char *path) | |
Constructor for a new file system. More... | |
virtual const char * | pathPrefix () |
Provides the path for all relevant files managed by this file system. | |
virtual bool | isValidFile (const char *path) |
Checks if the file is managed by this file system. More... | |
operator bool () | |
virtual const char * | name () |
virtual int | open (const char *path, int flags, int mode) |
virtual ssize_t | write (int fd, const void *data, size_t size) |
virtual ssize_t | read (int fd, void *data, size_t size) |
virtual int | close (int fd) |
virtual int | fstat (int fd, struct stat *st) |
virtual int | stat (const char *pathname, struct stat *statbuf) |
virtual off_t | lseek (int fd, off_t offset, int mode) |
virtual off_t | tell (int fd) |
virtual DIR * | opendir (const char *name) |
virtual dirent * | readdir (DIR *pdir) |
virtual int | closedir (DIR *pdir) |
virtual int | unlink (const char *path) |
virtual void * | mem_map (const char *path, size_t *p_size) |
virtual bool | is_readonly () |
Protected Member Functions | |
void | setup (const char *path) |
ES_SD & | getFS () |
File & | getFile (int fd) |
int | addOpenFile (const char *path, File &file) |
![]() | |
virtual int | filenameOffset () |
The ESP32 is removing the path prefix for all file processing. | |
const char * | internalFileName (const char *name, bool withPrefix) |
Protected Attributes | |
ES_SD * | p_fs = nullptr |
Vector< File * > | files |
const char * | FS_NAME_SD = "FileSystemSD" |
esp_vfs_t | myfs |
![]() | |
const char * | path_prefix = "@" |
int | filename_offset = 0 |
esp_vfs_t | myfs |
Additional Inherited Members | |
![]() | |
static const char * | standardName (const char *name) |
file name w/o leading / | |
We provide the posix file operations with the help of the SD library. For the ESP32 we set up a virtual file system.
|
inlineoverridevirtual |
Reimplemented from file_systems::FileSystemBase.
|
inlineoverridevirtual |
Reimplemented from file_systems::FileSystemBase.
|
inlineoverridevirtual |
Reimplemented from file_systems::FileSystemBase.
|
inlineoverridevirtual |
Reimplemented from file_systems::FileSystemBase.
|
inlineoverridevirtual |
Reimplemented from file_systems::FileSystemBase.
|
inlineoverridevirtual |
Reimplemented from file_systems::FileSystemBase.
|
inlineoverridevirtual |
Reimplemented from file_systems::FileSystemBase.
|
inlineoverridevirtual |
Reimplemented from file_systems::FileSystemBase.
Reimplemented from file_systems::FileSystemBase.
|
inlineoverridevirtual |
Reimplemented from file_systems::FileSystemBase.
|
inlineoverridevirtual |
Reimplemented from file_systems::FileSystemBase.