#pragma once struct flash_dev; struct mufs; struct mufs_dir; struct mufs_tree { struct mufs *fs; uint32_t va; uint32_t file_size; uint32_t root; uint8_t depth; }; struct mufs { struct mufs_tree root; struct flash_dev *dev; uint32_t nblocks; uint8_t log2_nentries; }; struct mufs_dirent { char path[256]; struct mufs_tree tree; uint8_t type; }; int mufs_mount(struct mufs *fs, struct flash_dev *dev); int mufs_format(struct flash_dev *dev); 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);