Components/IFS/src/include/IFS/FileSystem.h
Go to the documentation of this file.
uint32_t getSize(const String &fileName)
Definition: Components/IFS/src/include/IFS/FileSystem.h:166
int rename(const String &oldpath, const String &newpath)
Definition: Components/IFS/src/include/IFS/FileSystem.h:138
int setContent(const String &fileName, const String &content)
Definition: Components/IFS/src/include/IFS/FileSystem.h:269
const char * c_str() const
Get a constant (un-modifiable) pointer to String content.
Definition: WString.h:641
int stat(const String &path, Stat &s)
Definition: Components/IFS/src/include/IFS/FileSystem.h:81
virtual FileHandle open(const char *path, OpenFlags flags)=0
open a file by name/path
static constexpr FileSystem & cast(IFileSystem &fs)
Definition: Components/IFS/src/include/IFS/FileSystem.h:42
virtual int opendir(const char *path, DirHandle &dir)=0
open a directory for reading
int stat(const String &path, Stat *s)
get file information
Definition: Components/IFS/src/include/IFS/FileSystem.h:77
Installable File System base class.
Definition: Components/IFS/src/include/IFS/FileSystem.h:39
Definition: Delegate.h:20
int setContent(const String &fileName, const char *content)
Definition: Components/IFS/src/include/IFS/FileSystem.h:259
Definition: DirectoryTemplate.h:36
int opendir(const String &path, DirHandle &dir)
open a directory for reading
Definition: Components/IFS/src/include/IFS/FileSystem.h:56
virtual int ftruncate(FileHandle file, size_t new_size)=0
Truncate (reduce) the size of an open file.
size_t length(void) const
Obtain the String length in characters, excluding NUL terminator.
Definition: WString.h:237
int readContent(FileHandle file, size_t size, ReadContentCallback callback)
Read from current file position and invoke callback for each block read.
int setContent(const char *fileName, const void *content, size_t length)
int truncate(const char *fileName, size_t newSize)
Truncate a file to a specific size.
IFS::FileSystem * getFileSystem()
Get the currently active file system, if any.
Definition: Core/FileSystem.h:97
int makedirs(const char *path)
Create a directory and any intermediate directories if they do not already exist. ...
int setContent(const String &fileName, const void *content, size_t length)
Definition: Components/IFS/src/include/IFS/FileSystem.h:264
size_t getContent(const String &fileName, char *buffer, size_t bufSize)
Definition: Components/IFS/src/include/IFS/FileSystem.h:223
size_t getContent(const char *fileName, char *buffer, size_t bufSize)
int setContent(const char *fileName, const char *content)
Definition: Components/IFS/src/include/IFS/FileSystem.h:254
int ftruncate(FileHandle file)
Truncate an open file at the current cursor position.
Definition: Components/IFS/src/include/IFS/FileSystem.h:112
int truncate(const String &fileName, size_t newSize)
Definition: Components/IFS/src/include/IFS/FileSystem.h:125
int makedirs(const String &path)
Definition: Components/IFS/src/include/IFS/FileSystem.h:68
int fstat(FileHandle file, Stat &stat)
get file information
Definition: Components/IFS/src/include/IFS/FileSystem.h:90
FileHandle open(const String &path, OpenFlags flags)
open a file by name/path
Definition: Components/IFS/src/include/IFS/FileSystem.h:103
static constexpr FileSystem * cast(IFileSystem *fs)
Definition: Components/IFS/src/include/IFS/FileSystem.h:47
1.8.13