|
xt-sdk 文档 v1.0.3
xt-sdk 嵌入式 SDK API 参考
|
#include <xt_vfs.h>
成员变量 | |
| xt_vfs_err_t(* | mount )(void *ctx) |
| 挂载后端 | |
| xt_vfs_err_t(* | unmount )(void *ctx) |
| 卸载后端 | |
| xt_vfs_err_t(* | open )(void *ctx, const char *path, xt_vfs_mode_t flags, void **fh) |
| 打开文件 | |
| xt_vfs_err_t(* | close )(void *ctx, void *fh) |
| 关闭文件 | |
| xt_vfs_ssize_t(* | read )(void *ctx, void *fh, void *buf, xt_vfs_size_t size) |
| 读取文件 | |
| xt_vfs_ssize_t(* | write )(void *ctx, void *fh, const void *buf, xt_vfs_size_t size) |
| 写入文件 | |
| xt_vfs_ssize_t(* | seek )(void *ctx, void *fh, xt_vfs_off_t offset, xt_vfs_whence_t whence) |
| 文件定位 | |
| xt_vfs_ssize_t(* | tell )(void *ctx, void *fh) |
| 获取当前文件位置 | |
| xt_vfs_err_t(* | fsync )(void *ctx, void *fh) |
| 同步单个文件到存储设备 | |
| xt_vfs_err_t(* | remove )(void *ctx, const char *path) |
| 删除文件 | |
| xt_vfs_err_t(* | rename )(void *ctx, const char *old_path, const char *new_path) |
| 重命名文件 | |
| xt_vfs_err_t(* | stat )(void *ctx, const char *path, xt_vfs_stat_t *stat) |
| 获取文件状态 | |
| xt_vfs_err_t(* | statfs )(void *ctx, xt_vfs_statfs_t *statfs) |
| 获取文件系统状态 | |
| xt_vfs_err_t(* | mkdir )(void *ctx, const char *path) |
| 创建目录 | |
| xt_vfs_err_t(* | rmdir )(void *ctx, const char *path) |
| 删除空目录 | |
| xt_vfs_err_t(* | opendir )(void *ctx, const char *path, void **dh) |
| 打开目录 | |
| xt_vfs_err_t(* | closedir )(void *ctx, void *dh) |
| 关闭目录 | |
| xt_vfs_dirent_t *(* | readdir )(void *ctx, void *dh) |
| 读取目录项 | |
| xt_vfs_off_t(* | telldir )(void *ctx, void *dh) |
| 获取目录读取位置 | |
| xt_vfs_err_t(* | seekdir )(void *ctx, void *dh, xt_vfs_off_t loc) |
| 设置目录读取位置 | |
| xt_vfs_err_t(* | fstat )(void *ctx, void *fh, xt_vfs_stat_t *stat) |
| 获取已打开文件的状态 | |
| xt_vfs_err_t(* | truncate )(void *ctx, const char *path, xt_vfs_off_t length) |
| 截断文件到指定大小 | |
| xt_vfs_err_t(* | ftruncate )(void *ctx, void *fh, xt_vfs_off_t length) |
| 截断已打开的文件 | |
| xt_vfs_err_t(* | access )(void *ctx, const char *path, xt_vfs_mode_t amode) |
| 检查文件访问权限 | |
| xt_vfs_err_t(* | utime )(void *ctx, const char *path, const xt_vfs_utimbuf_t *buf) |
| 更新文件时间 | |
| xt_vfs_err_t(* | sync_all )(void *ctx, const char *path) |
| 同步所有文件到存储设备 | |
| xt_vfs_err_t(* xt_vfs_ops::access) (void *ctx, const char *path, xt_vfs_mode_t amode) |
| xt_vfs_err_t(* xt_vfs_ops::close) (void *ctx, void *fh) |
| xt_vfs_err_t(* xt_vfs_ops::closedir) (void *ctx, void *dh) |
| xt_vfs_err_t(* xt_vfs_ops::fstat) (void *ctx, void *fh, xt_vfs_stat_t *stat) |
| xt_vfs_err_t(* xt_vfs_ops::fsync) (void *ctx, void *fh) |
| xt_vfs_err_t(* xt_vfs_ops::ftruncate) (void *ctx, void *fh, xt_vfs_off_t length) |
| xt_vfs_err_t(* xt_vfs_ops::mkdir) (void *ctx, const char *path) |
| xt_vfs_err_t(* xt_vfs_ops::mount) (void *ctx) |
| xt_vfs_err_t(* xt_vfs_ops::open) (void *ctx, const char *path, xt_vfs_mode_t flags, void **fh) |
| xt_vfs_err_t(* xt_vfs_ops::opendir) (void *ctx, const char *path, void **dh) |
| xt_vfs_ssize_t(* xt_vfs_ops::read) (void *ctx, void *fh, void *buf, xt_vfs_size_t size) |
| xt_vfs_dirent_t *(* xt_vfs_ops::readdir) (void *ctx, void *dh) |
| xt_vfs_err_t(* xt_vfs_ops::remove) (void *ctx, const char *path) |
| xt_vfs_err_t(* xt_vfs_ops::rename) (void *ctx, const char *old_path, const char *new_path) |
| xt_vfs_err_t(* xt_vfs_ops::rmdir) (void *ctx, const char *path) |
| xt_vfs_ssize_t(* xt_vfs_ops::seek) (void *ctx, void *fh, xt_vfs_off_t offset, xt_vfs_whence_t whence) |
| xt_vfs_err_t(* xt_vfs_ops::seekdir) (void *ctx, void *dh, xt_vfs_off_t loc) |
| xt_vfs_err_t(* xt_vfs_ops::stat) (void *ctx, const char *path, xt_vfs_stat_t *stat) |
| xt_vfs_err_t(* xt_vfs_ops::statfs) (void *ctx, xt_vfs_statfs_t *statfs) |
| xt_vfs_err_t(* xt_vfs_ops::sync_all) (void *ctx, const char *path) |
| xt_vfs_ssize_t(* xt_vfs_ops::tell) (void *ctx, void *fh) |
获取当前文件位置
| ctx | 后端私有上下文 |
| fh | 后端私有文件句柄 |
| xt_vfs_off_t(* xt_vfs_ops::telldir) (void *ctx, void *dh) |
| xt_vfs_err_t(* xt_vfs_ops::truncate) (void *ctx, const char *path, xt_vfs_off_t length) |
| xt_vfs_err_t(* xt_vfs_ops::unmount) (void *ctx) |
| xt_vfs_err_t(* xt_vfs_ops::utime) (void *ctx, const char *path, const xt_vfs_utimbuf_t *buf) |
| xt_vfs_ssize_t(* xt_vfs_ops::write) (void *ctx, void *fh, const void *buf, xt_vfs_size_t size) |