Arduino Posix Filesystems
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
file_systems::FileSystemMemory Class Reference

Dedicated File System for PROGMEM memory files. More...

#include <FileSystemMemory.h>

Inheritance diagram for file_systems::FileSystemMemory:
file_systems::FileSystemBase

Public Member Functions

 FileSystemMemory (const char *path)
 
virtual bool is_readonly ()
 
void setFileSystemForSearch ()
 Selects the actual File System to be used for directory searches.
 
bool isValidFile (const char *path) override
 file is valid if it has been added More...
 
bool add (const char *name, const void *data, size_t len)
 adds a in memory file
 
RegEntryget (const char *path)
 Determines the regentry by name.
 
size_t size ()
 number of file entries
 
bool isEmpty ()
 Returns true if there are no files.
 
int open (const char *path, int flags, int mode) override
 file operations More...
 
ssize_t write (int fd, const void *data, size_t size) override
 write: not suported More...
 
ssize_t read (int fd, void *data, size_t size) override
 
off_t tell (int fd) 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 whence) override
 
DIRopendir (const char *name) override
 
direntreaddir (DIR *dir) override
 
int closedir (DIR *dir) override
 
int unlink (const char *path) override
 
virtual void * mem_map (const char *path, size_t *p_size) override
 
const char * name () override
 
- Public Member Functions inherited from file_systems::FileSystemBase
 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 DIRopendir (const char *name)
 
virtual direntreaddir (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

RegEntrygetEntry (int fd)
 
RegEntrygetEntry (const char *fileName)
 
bool isDir (const char *fileName)
 
RegContentMemorygetContent (RegEntry &entry)
 
int statContent (bool isDir, const char *fileName, RegContentMemory *p_memory, struct stat *st)
 
- Protected Member Functions inherited from file_systems::FileSystemBase
virtual int filenameOffset ()
 The ESP32 is removing the path prefix for all file processing.
 
const char * internalFileName (const char *name, bool withPrefix)
 

Protected Attributes

Vector< RegEntry * > files
 
bool api_files_with_prefix
 
MBEDFileSystemp_mbed = nullptr
 
- Protected Attributes inherited from file_systems::FileSystemBase
const char * path_prefix = "@"
 
int filename_offset = 0
 
esp_vfs_t myfs
 

Additional Inherited Members

- Static Public Member Functions inherited from file_systems::FileSystemBase
static const char * standardName (const char *name)
 file name w/o leading /
 

Detailed Description

Dedicated File System for PROGMEM memory files.

Author
Phil Schatzmann

Member Function Documentation

◆ close()

int file_systems::FileSystemMemory::close ( int  fd)
inlineoverridevirtual

Reimplemented from file_systems::FileSystemBase.

◆ closedir()

int file_systems::FileSystemMemory::closedir ( DIR dir)
inlineoverridevirtual

Reimplemented from file_systems::FileSystemBase.

◆ fstat()

int file_systems::FileSystemMemory::fstat ( int  fd,
struct stat st 
)
inlineoverridevirtual

Reimplemented from file_systems::FileSystemBase.

◆ is_readonly()

virtual bool file_systems::FileSystemMemory::is_readonly ( )
inlinevirtual

Reimplemented from file_systems::FileSystemBase.

◆ isValidFile()

bool file_systems::FileSystemMemory::isValidFile ( const char *  path)
inlineoverridevirtual

file is valid if it has been added

Reimplemented from file_systems::FileSystemBase.

◆ lseek()

off_t file_systems::FileSystemMemory::lseek ( int  fd,
off_t  offset,
int  whence 
)
inlineoverridevirtual

Reimplemented from file_systems::FileSystemBase.

◆ mem_map()

virtual void * file_systems::FileSystemMemory::mem_map ( const char *  path,
size_t *  p_size 
)
inlineoverridevirtual

Reimplemented from file_systems::FileSystemBase.

◆ name()

const char * file_systems::FileSystemMemory::name ( )
inlineoverridevirtual

Reimplemented from file_systems::FileSystemBase.

◆ open()

int file_systems::FileSystemMemory::open ( const char *  path,
int  flags,
int  mode 
)
inlineoverridevirtual

file operations

Reimplemented from file_systems::FileSystemBase.

◆ opendir()

DIR * file_systems::FileSystemMemory::opendir ( const char *  name)
inlineoverridevirtual

Reimplemented from file_systems::FileSystemBase.

◆ read()

ssize_t file_systems::FileSystemMemory::read ( int  fd,
void *  data,
size_t  size 
)
inlineoverridevirtual

Reimplemented from file_systems::FileSystemBase.

◆ readdir()

dirent * file_systems::FileSystemMemory::readdir ( DIR dir)
inlineoverridevirtual

Reimplemented from file_systems::FileSystemBase.

◆ stat()

int file_systems::FileSystemMemory::stat ( const char *  path,
struct stat st 
)
inlineoverridevirtual

Reimplemented from file_systems::FileSystemBase.

◆ tell()

off_t file_systems::FileSystemMemory::tell ( int  fd)
inlineoverridevirtual

Reimplemented from file_systems::FileSystemBase.

◆ unlink()

int file_systems::FileSystemMemory::unlink ( const char *  path)
inlineoverridevirtual

Reimplemented from file_systems::FileSystemBase.

◆ write()

ssize_t file_systems::FileSystemMemory::write ( int  fd,
const void *  data,
size_t  size 
)
inlineoverridevirtual

write: not suported

Reimplemented from file_systems::FileSystemBase.


The documentation for this class was generated from the following file: