mufs: add support for reading and writing files

This commit is contained in:
S.J.R. van Schaik 2017-06-11 17:42:32 +02:00
parent 845aba61ed
commit 1c736c3324
3 changed files with 151 additions and 0 deletions

View file

@ -3,6 +3,7 @@
struct flash_dev;
struct mufs;
struct mufs_dir;
struct mufs_file;
struct mufs_tree {
struct mufs *fs;
@ -33,3 +34,9 @@ struct mufs_dir *mufs_opendir(struct mufs *fs, const char *path);
void mufs_closedir(struct mufs_dir *dir);
int mufs_readdir(struct mufs_dir *dir, struct mufs_dirent *dirent);
int mufs_mkdir(struct mufs *fs, const char *path);
int mufs_create(struct mufs *fs, const char *path);
struct mufs_file *mufs_open(struct mufs *fs, const char *path);
void mufs_close(struct mufs_file *file);
size_t mufs_read(struct mufs_file *file, void *data, size_t len);
size_t mufs_write(struct mufs_file *file, const void *data, size_t len);