|
| int | opendir (const String &path, DirHandle &dir) |
| | open a directory for reading More...
|
| |
| int | mkdir (const String &path) |
| |
| int | makedirs (const char *path) |
| | Create a directory and any intermediate directories if they do not already exist. More...
|
| |
| int | makedirs (const String &path) |
| |
| int | stat (const String &path, Stat *s) |
| |
| int | stat (const String &path, Stat &s) |
| |
| int | fstat (FileHandle file, Stat &stat) |
| |
| FileHandle | open (const String &path, OpenFlags flags) |
| |
| int | ftruncate (FileHandle file) |
| |
| int | truncate (const char *fileName, size_t newSize) |
| | Truncate a file to a specific size. More...
|
| |
| int | truncate (const String &fileName, size_t newSize) |
| |
| String | getContent (const String &fileName) |
| | Read content of a file. More...
|
| |
|
- Parameters
-
| fileName | Name of file to read from |
| buffer | Pointer to a character buffer in to which to read the file content |
| bufSize | Quantity of bytes to read from file |
- Return values
-
| size_t | Quantity of bytes read from file or zero on failure |
After calling this function the content of the file is placed in to a c-string Ensure there is sufficient space in the buffer for file content plus extra trailing null, i.e. at least bufSize + 1 Always check the return value!
Returns 0 if the file could not be read
|
| size_t | getContent (const char *fileName, char *buffer, size_t bufSize) |
| |
| size_t | getContent (const String &fileName, char *buffer, size_t bufSize) |
| |
|
- Parameters
-
| fileName | Name of file to create or replace |
| content | Pointer to c-string containing content to populate file with |
- Return values
-
| int | Number of bytes transferred or error code |
- Parameters
-
| length | (optional) number of characters to write |
This function creates a new file or replaces an existing file and populates the file with the content of a c-string buffer.
|
| int | setContent (const char *fileName, const void *content, size_t length) |
| |
| int | setContent (const char *fileName, const char *content) |
| |
| int | setContent (const String &fileName, const char *content) |
| |
| int | setContent (const String &fileName, const void *content, size_t length) |
| |
| int | setContent (const String &fileName, const String &content) |
| |
| virtual | ~IFileSystem () |
| | Filing system implementations should dismount and cleanup here. More...
|
| |
| virtual int | mount ()=0 |
| | Mount file system, performing any required initialisation. More...
|
| |
| virtual int | getinfo (Info &info)=0 |
| | get filing system information More...
|
| |
| virtual int | setProfiler (IProfiler *profiler) |
| | Set profiler instance to enable debugging and performance assessment. More...
|
| |
| virtual String | getErrorString (int err) |
| | get the text for a returned error code More...
|
| |
| virtual int | setVolume (uint8_t index, IFileSystem *fileSystem) |
| | Set volume for mountpoint. More...
|
| |
| virtual int | opendir (const char *path, DirHandle &dir)=0 |
| | open a directory for reading More...
|
| |
| virtual int | readdir (DirHandle dir, Stat &stat)=0 |
| | read a directory entry More...
|
| |
| virtual int | rewinddir (DirHandle dir)=0 |
| | Reset directory read position to start. More...
|
| |
| virtual int | closedir (DirHandle dir)=0 |
| | close a directory object More...
|
| |
| virtual int | mkdir (const char *path)=0 |
| | Create a directory. More...
|
| |
| virtual int | stat (const char *path, Stat *stat)=0 |
| | get file information More...
|
| |
| virtual int | fstat (FileHandle file, Stat *stat)=0 |
| | get file information More...
|
| |
| virtual int | fcontrol (FileHandle file, ControlCode code, void *buffer, size_t bufSize) |
| | Low-level and non-standard file control operations. More...
|
| |
| virtual FileHandle | open (const char *path, OpenFlags flags)=0 |
| | open a file by path More...
|
| |
| virtual int | close (FileHandle file)=0 |
| | close an open file More...
|
| |
| virtual int | read (FileHandle file, void *data, size_t size)=0 |
| | read content from a file and advance cursor More...
|
| |
| virtual int | write (FileHandle file, const void *data, size_t size)=0 |
| | write content to a file at current position and advance cursor More...
|
| |
| virtual int | lseek (FileHandle file, int offset, SeekOrigin origin)=0 |
| | change file read/write position More...
|
| |
| virtual int | eof (FileHandle file)=0 |
| | determine if current file position is at end of file More...
|
| |
| virtual int32_t | tell (FileHandle file)=0 |
| | get current file position More...
|
| |
| virtual int | ftruncate (FileHandle file, size_t new_size)=0 |
| | Truncate (reduce) the size of an open file. More...
|
| |
| virtual int | flush (FileHandle file)=0 |
| | flush any buffered data to physical media More...
|
| |
| virtual int | fsetxattr (FileHandle file, AttributeTag tag, const void *data, size_t size)=0 |
| | Set an extended attribute on an open file. More...
|
| |
| virtual int | fgetxattr (FileHandle file, AttributeTag tag, void *buffer, size_t size)=0 |
| | Get an extended attribute from an open file. More...
|
| |
| virtual int | fenumxattr (FileHandle file, AttributeEnumCallback callback, void *buffer, size_t bufsize)=0 |
| | Enumerate attributes. More...
|
| |
| virtual int | setxattr (const char *path, AttributeTag tag, const void *data, size_t size)=0 |
| | Set an extended attribute for a file given its path. More...
|
| |
| virtual int | getxattr (const char *path, AttributeTag tag, void *buffer, size_t size)=0 |
| | Get an attribute from a file given its path. More...
|
| |
| virtual int | rename (const char *oldpath, const char *newpath)=0 |
| | rename a file More...
|
| |
| virtual int | remove (const char *path)=0 |
| | remove (delete) a file by path More...
|
| |
| virtual int | fremove (FileHandle file)=0 |
| | remove (delete) a file by handle More...
|
| |
| virtual int | format ()=0 |
| | format the filing system More...
|
| |
| virtual int | check () |
| | Perform a file system consistency check. More...
|
| |
|
- Parameters
-
- Return values
-
|
| using | ReadContentCallback = Delegate< int(const char *buffer, size_t size)> |
| | Callback for readContent method. More...
|
| |
| int | rename (const String &oldpath, const String &newpath) |
| |
| int | remove (const String &path) |
| | remove (delete) a file by path More...
|
| |
| int | setAttribute (FileHandle file, AttributeTag tag, const void *data, size_t size) |
| |
| int | setAttribute (const char *file, AttributeTag tag, const void *data, size_t size) |
| |
| int | setAttribute (const String &file, AttributeTag tag, const void *data, size_t size) |
| |
| template<typename T > |
| int | setAttribute (const T &file, AttributeTag tag, const String &data) |
| |
| int | getAttribute (FileHandle file, AttributeTag tag, void *buffer, size_t size) |
| |
| int | getAttribute (const char *file, AttributeTag tag, void *buffer, size_t size) |
| |
| int | getAttribute (const String &file, AttributeTag tag, void *buffer, size_t size) |
| |
| template<typename T > |
| int | getAttribute (const T &file, AttributeTag tag, String &value) |
| |
| template<typename T > |
| String | getAttribute (const T &file, AttributeTag tag) |
| |
| template<typename T > |
| int | removeAttribute (const T &file, AttributeTag tag) |
| |
| template<typename T , typename... ParamTypes> |
| int | setUserAttribute (const T &file, uint8_t tagValue, ParamTypes... params) |
| |
| template<typename T , typename... ParamTypes> |
| int | getUserAttribute (const T &file, uint8_t tagValue, ParamTypes... params) |
| |
| template<typename T > |
| String | getUserAttribute (const T &file, uint8_t tagValue) |
| |
| template<typename T > |
| bool | removeUserAttribute (const T &file, uint8_t tagValue) |
| |
| template<typename T > |
| int | setacl (const T &file, const ACL &acl) |
| | Set access control information for file. More...
|
| |
| template<typename T > |
| int | setattr (const T &file, FileAttributes attr) |
| | Set file attributes. More...
|
| |
| template<typename T > |
| int | settime (const T &file, time_t mtime) |
| | Set modification time for file. More...
|
| |
| template<typename T > |
| int | setcompression (const T &file, const Compression &compression) |
| | Set file compression information. More...
|
| |
| uint32_t | getSize (FileHandle file) |
| | Get size of file. More...
|
| |
| uint32_t | getSize (const char *fileName) |
| | Get size of file. More...
|
| |
| uint32_t | getSize (const String &fileName) |
| |
| int | readContent (FileHandle file, size_t size, ReadContentCallback callback) |
| | Read from current file position and invoke callback for each block read. More...
|
| |
| int | readContent (FileHandle file, ReadContentCallback callback) |
| | Read from current file position to end of file and invoke callback for each block read. More...
|
| |
| int | readContent (const String &filename, ReadContentCallback callback) |
| | Read entire file content in blocks, invoking callback after every read. More...
|
| |
Installable File System base class.
Adds additional methods to ease use over base IFileSystem.