Lines Matching defs:lfs
416 typedef struct lfs {
463 int lfs_format(lfs_t *lfs, const struct lfs_config *config);
470 // lfs and config must be allocated while mounted. The config struct must
474 int lfs_mount(lfs_t *lfs, const struct lfs_config *config);
480 int lfs_unmount(lfs_t *lfs);
489 int lfs_remove(lfs_t *lfs, const char *path);
499 int lfs_rename(lfs_t *lfs, const char *oldpath, const char *newpath);
506 int lfs_stat(lfs_t *lfs, const char *path, struct lfs_info *info);
520 lfs_ssize_t lfs_getattr(lfs_t *lfs, const char *path,
531 int lfs_setattr(lfs_t *lfs, const char *path,
541 int lfs_removeattr(lfs_t *lfs, const char *path, uint8_t type);
554 int lfs_file_open(lfs_t *lfs, lfs_file_t *file,
571 int lfs_file_opencfg(lfs_t *lfs, lfs_file_t *file,
581 int lfs_file_close(lfs_t *lfs, lfs_file_t *file);
587 int lfs_file_sync(lfs_t *lfs, lfs_file_t *file);
593 lfs_ssize_t lfs_file_read(lfs_t *lfs, lfs_file_t *file,
603 lfs_ssize_t lfs_file_write(lfs_t *lfs, lfs_file_t *file,
611 lfs_soff_t lfs_file_seek(lfs_t *lfs, lfs_file_t *file,
618 int lfs_file_truncate(lfs_t *lfs, lfs_file_t *file, lfs_off_t size);
623 // Equivalent to lfs_file_seek(lfs, file, 0, LFS_SEEK_CUR)
625 lfs_soff_t lfs_file_tell(lfs_t *lfs, lfs_file_t *file);
629 // Equivalent to lfs_file_seek(lfs, file, 0, LFS_SEEK_SET)
631 int lfs_file_rewind(lfs_t *lfs, lfs_file_t *file);
635 // Similar to lfs_file_seek(lfs, file, 0, LFS_SEEK_END)
637 lfs_soff_t lfs_file_size(lfs_t *lfs, lfs_file_t *file);
646 int lfs_mkdir(lfs_t *lfs, const char *path);
653 int lfs_dir_open(lfs_t *lfs, lfs_dir_t *dir, const char *path);
659 int lfs_dir_close(lfs_t *lfs, lfs_dir_t *dir);
666 int lfs_dir_read(lfs_t *lfs, lfs_dir_t *dir, struct lfs_info *info);
674 int lfs_dir_seek(lfs_t *lfs, lfs_dir_t *dir, lfs_off_t off);
682 lfs_soff_t lfs_dir_tell(lfs_t *lfs, lfs_dir_t *dir);
687 int lfs_dir_rewind(lfs_t *lfs, lfs_dir_t *dir);
696 int lfs_fs_stat(lfs_t *lfs, struct lfs_fsinfo *fsinfo);
704 lfs_ssize_t lfs_fs_size(lfs_t *lfs);
713 int lfs_fs_traverse(lfs_t *lfs, int (*cb)(void*, lfs_block_t), void *data);
725 int lfs_fs_gc(lfs_t *lfs);
736 int lfs_fs_mkconsistent(lfs_t *lfs);
746 int lfs_fs_grow(lfs_t *lfs, lfs_size_t block_count);
762 int lfs_migrate(lfs_t *lfs, const struct lfs_config *cfg);