mbed-drivers
|
#include <FileSystemLike.h>
Public Member Functions | |
FileSystemLike (const char *name) | |
virtual FileHandle * | open (const char *filename, int flags)=0 |
virtual int | remove (const char *filename) |
virtual int | rename (const char *oldname, const char *newname) |
virtual DirHandle * | opendir (const char *name) |
virtual int | mkdir (const char *name, mode_t mode) |
![]() | |
FileBase (const char *name, PathType t) | |
const char * | getName (void) |
PathType | getPathType (void) |
Static Public Member Functions | |
static DirHandle * | opendir () |
![]() | |
static FileBase * | lookup (const char *name, unsigned int len) |
static FileBase * | get (int n) |
Friends | |
class | BaseDirHandle |
Additional Inherited Members | |
![]() | |
FileBase * | _next |
const char * | _name |
PathType | _path_type |
![]() | |
static FileBase * | _head = NULL |
A filesystem-like object is one that can be used to open files though it by fopen("/name/filename", mode)
Implementations must define at least open (the default definitions of the rest of the functions just return error values).
mbed::FileSystemLike::FileSystemLike | ( | const char * | name | ) |
FileSystemLike constructor
name | The name to use for the filesystem. |
|
inlinevirtual |
Creates a directory in the filesystem.
name | The name of the directory to create. |
mode | The permissions to create the directory with. |
|
pure virtual |
Opens a file from the filesystem
filename | The name of the file to open. |
flags | One of O_RDONLY, O_WRONLY, or O_RDWR, OR'd with zero or more of O_CREAT, O_TRUNC, or O_APPEND. |
|
inlinevirtual |
|
inlinevirtual |
Remove a file from the filesystem.
filename | the name of the file to remove. |
returns | 0 on success, -1 on failure. |
|
inlinevirtual |
Rename a file in the filesystem.
oldname | the name of the file to rename. |
newname | the name to rename it to. |