VSF Documented
Data Structures | Typedefs | Functions
esp_vfs_ops.h File Reference
#include <stdint.h>
#include <stddef.h>
#include <stdarg.h>
#include <stdbool.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <dirent.h>
#include "esp_err.h"

Go to the source code of this file.

Data Structures

struct  esp_vfs_select_sem_t
 
struct  esp_vfs_dir_ops_t
 
struct  esp_vfs_fs_ops_t
 

Typedefs

typedef int esp_vfs_id_t
 
typedef ssize_t(* esp_vfs_write_ctx_op_t) (void *ctx, int fd, const void *data, size_t size)
 
typedef ssize_t(* esp_vfs_write_op_t) (int fd, const void *data, size_t size)
 
typedef off_t(* esp_vfs_lseek_ctx_op_t) (void *ctx, int fd, off_t size, int mode)
 
typedef off_t(* esp_vfs_lseek_op_t) (int fd, off_t size, int mode)
 
typedef ssize_t(* esp_vfs_read_ctx_op_t) (void *ctx, int fd, void *dst, size_t size)
 
typedef ssize_t(* esp_vfs_read_op_t) (int fd, void *dst, size_t size)
 
typedef ssize_t(* esp_vfs_pread_ctx_op_t) (void *ctx, int fd, void *dst, size_t size, off_t offset)
 
typedef ssize_t(* esp_vfs_pread_op_t) (int fd, void *dst, size_t size, off_t offset)
 
typedef ssize_t(* esp_vfs_pwrite_ctx_op_t) (void *ctx, int fd, const void *src, size_t size, off_t offset)
 
typedef ssize_t(* esp_vfs_pwrite_op_t) (int fd, const void *src, size_t size, off_t offset)
 
typedef int(* esp_vfs_open_ctx_op_t) (void *ctx, const char *path, int flags, int mode)
 
typedef int(* esp_vfs_open_op_t) (const char *path, int flags, int mode)
 
typedef int(* esp_vfs_close_ctx_op_t) (void *ctx, int fd)
 
typedef int(* esp_vfs_close_op_t) (int fd)
 
typedef int(* esp_vfs_fstat_ctx_op_t) (void *ctx, int fd, struct stat *st)
 
typedef int(* esp_vfs_fstat_op_t) (int fd, struct stat *st)
 
typedef int(* esp_vfs_fcntl_ctx_op_t) (void *ctx, int fd, int cmd, int arg)
 
typedef int(* esp_vfs_fcntl_op_t) (int fd, int cmd, int arg)
 
typedef int(* esp_vfs_ioctl_ctx_op_t) (void *ctx, int fd, int cmd, va_list args)
 
typedef int(* esp_vfs_ioctl_op_t) (int fd, int cmd, va_list args)
 
typedef int(* esp_vfs_fsync_ctx_op_t) (void *ctx, int fd)
 
typedef int(* esp_vfs_fsync_op_t) (int fd)
 
typedef int(* esp_vfs_stat_ctx_op_t) (void *ctx, const char *path, struct stat *st)
 
typedef int(* esp_vfs_stat_op_t) (const char *path, struct stat *st)
 
typedef int(* esp_vfs_link_ctx_op_t) (void *ctx, const char *n1, const char *n2)
 
typedef int(* esp_vfs_link_op_t) (const char *n1, const char *n2)
 
typedef int(* esp_vfs_unlink_ctx_op_t) (void *ctx, const char *path)
 
typedef int(* esp_vfs_unlink_op_t) (const char *path)
 
typedef int(* esp_vfs_rename_ctx_op_t) (void *ctx, const char *src, const char *dst)
 
typedef int(* esp_vfs_rename_op_t) (const char *src, const char *dst)
 
typedef DIR *(* esp_vfs_opendir_ctx_op_t) (void *ctx, const char *name)
 
typedef DIR *(* esp_vfs_opendir_op_t) (const char *name)
 
typedef struct dirent *(* esp_vfs_readdir_ctx_op_t) (void *ctx, DIR *pdir)
 
typedef struct dirent *(* esp_vfs_readdir_op_t) (DIR *pdir)
 
typedef int(* esp_vfs_readdir_r_ctx_op_t) (void *ctx, DIR *pdir, struct dirent *entry, struct dirent **out)
 
typedef int(* esp_vfs_readdir_r_op_t) (DIR *pdir, struct dirent *entry, struct dirent **out)
 
typedef long(* esp_vfs_telldir_ctx_op_t) (void *ctx, DIR *pdir)
 
typedef long(* esp_vfs_telldir_op_t) (DIR *pdir)
 
typedef void(* esp_vfs_seekdir_ctx_op_t) (void *ctx, DIR *pdir, long offset)
 
typedef void(* esp_vfs_seekdir_op_t) (DIR *pdir, long offset)
 
typedef int(* esp_vfs_closedir_ctx_op_t) (void *ctx, DIR *pdir)
 
typedef int(* esp_vfs_closedir_op_t) (DIR *pdir)
 
typedef int(* esp_vfs_mkdir_ctx_op_t) (void *ctx, const char *name, mode_t mode)
 
typedef int(* esp_vfs_mkdir_op_t) (const char *name, mode_t mode)
 
typedef int(* esp_vfs_rmdir_ctx_op_t) (void *ctx, const char *name)
 
typedef int(* esp_vfs_rmdir_op_t) (const char *name)
 
typedef int(* esp_vfs_access_ctx_op_t) (void *ctx, const char *path, int amode)
 
typedef int(* esp_vfs_access_op_t) (const char *path, int amode)
 
typedef int(* esp_vfs_truncate_ctx_op_t) (void *ctx, const char *path, off_t length)
 
typedef int(* esp_vfs_truncate_op_t) (const char *path, off_t length)
 
typedef int(* esp_vfs_ftruncate_ctx_op_t) (void *ctx, int fd, off_t length)
 
typedef int(* esp_vfs_ftruncate_op_t) (int fd, off_t length)
 

Functions

esp_err_t esp_vfs_register_fs (const char *base_path, const esp_vfs_fs_ops_t *vfs, int flags, void *ctx)
 
esp_err_t esp_vfs_register_fs_with_id (const esp_vfs_fs_ops_t *vfs, int flags, void *ctx, esp_vfs_id_t *id)
 
esp_err_t esp_vfs_unregister_fs (const char *base_path)
 
esp_err_t esp_vfs_unregister_fs_with_id (esp_vfs_id_t id)
 

Typedef Documentation

◆ esp_vfs_id_t

typedef int esp_vfs_id_t

◆ esp_vfs_write_ctx_op_t

typedef ssize_t(* esp_vfs_write_ctx_op_t) (void *ctx, int fd, const void *data, size_t size)

◆ esp_vfs_write_op_t

typedef ssize_t(* esp_vfs_write_op_t) (int fd, const void *data, size_t size)

◆ esp_vfs_lseek_ctx_op_t

typedef off_t(* esp_vfs_lseek_ctx_op_t) (void *ctx, int fd, off_t size, int mode)

◆ esp_vfs_lseek_op_t

typedef off_t(* esp_vfs_lseek_op_t) (int fd, off_t size, int mode)

◆ esp_vfs_read_ctx_op_t

typedef ssize_t(* esp_vfs_read_ctx_op_t) (void *ctx, int fd, void *dst, size_t size)

◆ esp_vfs_read_op_t

typedef ssize_t(* esp_vfs_read_op_t) (int fd, void *dst, size_t size)

◆ esp_vfs_pread_ctx_op_t

typedef ssize_t(* esp_vfs_pread_ctx_op_t) (void *ctx, int fd, void *dst, size_t size, off_t offset)

◆ esp_vfs_pread_op_t

typedef ssize_t(* esp_vfs_pread_op_t) (int fd, void *dst, size_t size, off_t offset)

◆ esp_vfs_pwrite_ctx_op_t

typedef ssize_t(* esp_vfs_pwrite_ctx_op_t) (void *ctx, int fd, const void *src, size_t size, off_t offset)

◆ esp_vfs_pwrite_op_t

typedef ssize_t(* esp_vfs_pwrite_op_t) (int fd, const void *src, size_t size, off_t offset)

◆ esp_vfs_open_ctx_op_t

typedef int(* esp_vfs_open_ctx_op_t) (void *ctx, const char *path, int flags, int mode)

◆ esp_vfs_open_op_t

typedef int(* esp_vfs_open_op_t) (const char *path, int flags, int mode)

◆ esp_vfs_close_ctx_op_t

typedef int(* esp_vfs_close_ctx_op_t) (void *ctx, int fd)

◆ esp_vfs_close_op_t

typedef int(* esp_vfs_close_op_t) (int fd)

◆ esp_vfs_fstat_ctx_op_t

typedef int(* esp_vfs_fstat_ctx_op_t) (void *ctx, int fd, struct stat *st)

◆ esp_vfs_fstat_op_t

typedef int(* esp_vfs_fstat_op_t) (int fd, struct stat *st)

◆ esp_vfs_fcntl_ctx_op_t

typedef int(* esp_vfs_fcntl_ctx_op_t) (void *ctx, int fd, int cmd, int arg)

◆ esp_vfs_fcntl_op_t

typedef int(* esp_vfs_fcntl_op_t) (int fd, int cmd, int arg)

◆ esp_vfs_ioctl_ctx_op_t

typedef int(* esp_vfs_ioctl_ctx_op_t) (void *ctx, int fd, int cmd, va_list args)

◆ esp_vfs_ioctl_op_t

typedef int(* esp_vfs_ioctl_op_t) (int fd, int cmd, va_list args)

◆ esp_vfs_fsync_ctx_op_t

typedef int(* esp_vfs_fsync_ctx_op_t) (void *ctx, int fd)

◆ esp_vfs_fsync_op_t

typedef int(* esp_vfs_fsync_op_t) (int fd)

◆ esp_vfs_stat_ctx_op_t

typedef int(* esp_vfs_stat_ctx_op_t) (void *ctx, const char *path, struct stat *st)

◆ esp_vfs_stat_op_t

typedef int(* esp_vfs_stat_op_t) (const char *path, struct stat *st)

◆ esp_vfs_link_ctx_op_t

typedef int(* esp_vfs_link_ctx_op_t) (void *ctx, const char *n1, const char *n2)

◆ esp_vfs_link_op_t

typedef int(* esp_vfs_link_op_t) (const char *n1, const char *n2)

◆ esp_vfs_unlink_ctx_op_t

typedef int(* esp_vfs_unlink_ctx_op_t) (void *ctx, const char *path)

◆ esp_vfs_unlink_op_t

typedef int(* esp_vfs_unlink_op_t) (const char *path)

◆ esp_vfs_rename_ctx_op_t

typedef int(* esp_vfs_rename_ctx_op_t) (void *ctx, const char *src, const char *dst)

◆ esp_vfs_rename_op_t

typedef int(* esp_vfs_rename_op_t) (const char *src, const char *dst)

◆ esp_vfs_opendir_ctx_op_t

typedef DIR *(* esp_vfs_opendir_ctx_op_t) (void *ctx, const char *name)

◆ esp_vfs_opendir_op_t

typedef DIR *(* esp_vfs_opendir_op_t) (const char *name)

◆ esp_vfs_readdir_ctx_op_t

typedef struct dirent *(* esp_vfs_readdir_ctx_op_t) (void *ctx, DIR *pdir)

◆ esp_vfs_readdir_op_t

typedef struct dirent *(* esp_vfs_readdir_op_t) (DIR *pdir)

◆ esp_vfs_readdir_r_ctx_op_t

typedef int(* esp_vfs_readdir_r_ctx_op_t) (void *ctx, DIR *pdir, struct dirent *entry, struct dirent **out)

◆ esp_vfs_readdir_r_op_t

typedef int(* esp_vfs_readdir_r_op_t) (DIR *pdir, struct dirent *entry, struct dirent **out)

◆ esp_vfs_telldir_ctx_op_t

typedef long(* esp_vfs_telldir_ctx_op_t) (void *ctx, DIR *pdir)

◆ esp_vfs_telldir_op_t

typedef long(* esp_vfs_telldir_op_t) (DIR *pdir)

◆ esp_vfs_seekdir_ctx_op_t

typedef void(* esp_vfs_seekdir_ctx_op_t) (void *ctx, DIR *pdir, long offset)

◆ esp_vfs_seekdir_op_t

typedef void(* esp_vfs_seekdir_op_t) (DIR *pdir, long offset)

◆ esp_vfs_closedir_ctx_op_t

typedef int(* esp_vfs_closedir_ctx_op_t) (void *ctx, DIR *pdir)

◆ esp_vfs_closedir_op_t

typedef int(* esp_vfs_closedir_op_t) (DIR *pdir)

◆ esp_vfs_mkdir_ctx_op_t

typedef int(* esp_vfs_mkdir_ctx_op_t) (void *ctx, const char *name, mode_t mode)

◆ esp_vfs_mkdir_op_t

typedef int(* esp_vfs_mkdir_op_t) (const char *name, mode_t mode)

◆ esp_vfs_rmdir_ctx_op_t

typedef int(* esp_vfs_rmdir_ctx_op_t) (void *ctx, const char *name)

◆ esp_vfs_rmdir_op_t

typedef int(* esp_vfs_rmdir_op_t) (const char *name)

◆ esp_vfs_access_ctx_op_t

typedef int(* esp_vfs_access_ctx_op_t) (void *ctx, const char *path, int amode)

◆ esp_vfs_access_op_t

typedef int(* esp_vfs_access_op_t) (const char *path, int amode)

◆ esp_vfs_truncate_ctx_op_t

typedef int(* esp_vfs_truncate_ctx_op_t) (void *ctx, const char *path, off_t length)

◆ esp_vfs_truncate_op_t

typedef int(* esp_vfs_truncate_op_t) (const char *path, off_t length)

◆ esp_vfs_ftruncate_ctx_op_t

typedef int(* esp_vfs_ftruncate_ctx_op_t) (void *ctx, int fd, off_t length)

◆ esp_vfs_ftruncate_op_t

typedef int(* esp_vfs_ftruncate_op_t) (int fd, off_t length)

Function Documentation

◆ esp_vfs_register_fs()

esp_err_t esp_vfs_register_fs ( const char *  base_path,
const esp_vfs_fs_ops_t vfs,
int  flags,
void *  ctx 
)
extern

◆ esp_vfs_register_fs_with_id()

esp_err_t esp_vfs_register_fs_with_id ( const esp_vfs_fs_ops_t vfs,
int  flags,
void *  ctx,
esp_vfs_id_t id 
)
extern

◆ esp_vfs_unregister_fs()

esp_err_t esp_vfs_unregister_fs ( const char *  base_path)
extern

◆ esp_vfs_unregister_fs_with_id()

esp_err_t esp_vfs_unregister_fs_with_id ( esp_vfs_id_t  id)
extern
Generated from commit: vsfteam/vsf@c3767bf