20 MTSTATUS(*
read)(
const char* filename, uint32_t* file_size_out,
void** buffer_out);
21 MTSTATUS(*
write)(
const char* path,
const void* data, uint32_t size, uint32_t mode);
43MTSTATUS vfs_read(
const char* filename, uint32_t* file_size_out,
void** buffer_out);
#define WRITE_MODE_APPEND_EXISTING
#define WRITE_MODE_CREATE_OR_REPLACE
MTSTATUS(* write)(const char *path, const void *data, uint32_t size, uint32_t mode)
bool(* is_dir_empty)(const char *path)
MTSTATUS(* read)(const char *filename, uint32_t *file_size_out, void **buffer_out)
MTSTATUS(* init)(uint8_t device_id)
MTSTATUS(* listdir)(const char *path, char *listings, size_t max_len)
void(* listrootdir)(void)
MTSTATUS(* mkdir)(const char *path)
MTSTATUS(* rmdir)(const char *path)
MTSTATUS vfs_read(const char *filename, uint32_t *file_size_out, void **buffer_out)
Reads the file into a buffer.
MTSTATUS vfs_rmdir(const char *path)
This function deletes the directory given to the function from the system along with its file (marks ...
void vfs_listrootdir(void)
This function will list the root directory of the main mount device.
MTSTATUS vfs_listdir(const char *path, char *listings, size_t max_len)
Lists the directory given.
MTSTATUS vfs_mkdir(const char *path)
Creates a new directory.
bool vfs_is_dir_empty(const char *path)
This function returns if the directory given to the function is empty (e.g, has only '....
enum _FS_WRITE_MODES FS_WRITE_MODES
MTSTATUS vfs_delete(const char *path)
This function deletes the file given to the function from the system.
MTSTATUS vfs_init(void)
Initialize the Virtual File System (initializes other filesystem needed services as well)
MTSTATUS vfs_write(const char *path, const void *data, uint32_t size, FS_WRITE_MODES write_mode)
Creates a new file (or opens existing) and writes data to it.