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

Go to the source code of this file.

Data Structures

struct  esp_vfs_t
 

Macros

#define ESP_VFS_PATH_MAX   15
 
#define MAX_FDS   FD_SETSIZE
 
#define ESP_VFS_FLAG_DEFAULT   (1 << 0)
 
#define ESP_VFS_FLAG_CONTEXT_PTR   (1 << 1)
 
#define ESP_VFS_FLAG_READONLY_FS   (1 << 2)
 
#define ESP_VFS_FLAG_STATIC   (1 << 3)
 

Functions

esp_err_t esp_vfs_register (const char *base_path, const esp_vfs_t *vfs, void *ctx)
 
esp_err_t esp_vfs_unregister (const char *base_path)
 
esp_err_t esp_vfs_register_fd_range (const esp_vfs_t *vfs, void *ctx, int min_fd, int max_fd)
 
esp_err_t esp_vfs_register_with_id (const esp_vfs_t *vfs, void *ctx, esp_vfs_id_t *vfs_id)
 
esp_err_t esp_vfs_unregister_with_id (esp_vfs_id_t vfs_id)
 
esp_err_t esp_vfs_register_fd (esp_vfs_id_t vfs_id, int *fd)
 
esp_err_t esp_vfs_register_fd_with_local_fd (esp_vfs_id_t vfs_id, int local_fd, bool permanent, int *fd)
 
esp_err_t esp_vfs_unregister_fd (esp_vfs_id_t vfs_id, int fd)
 
ssize_t esp_vfs_write (struct _reent *r, int fd, const void *data, size_t size)
 
off_t esp_vfs_lseek (struct _reent *r, int fd, off_t size, int mode)
 
ssize_t esp_vfs_read (struct _reent *r, int fd, void *dst, size_t size)
 
int esp_vfs_open (struct _reent *r, const char *path, int flags, int mode)
 
int esp_vfs_close (struct _reent *r, int fd)
 
int esp_vfs_fstat (struct _reent *r, int fd, struct stat *st)
 
int esp_vfs_stat (struct _reent *r, const char *path, struct stat *st)
 
int esp_vfs_link (struct _reent *r, const char *n1, const char *n2)
 
int esp_vfs_unlink (struct _reent *r, const char *path)
 
int esp_vfs_rename (struct _reent *r, const char *src, const char *dst)
 
int esp_vfs_utime (const char *path, const struct utimbuf *times)
 
int esp_vfs_fsync (int fd)
 
int esp_vfs_fcntl_r (struct _reent *r, int fd, int cmd, int arg)
 
int esp_vfs_ioctl (int fd, int cmd,...)
 
int esp_vfs_truncate (const char *path, off_t length)
 
int esp_vfs_ftruncate (int fd, off_t length)
 
int esp_vfs_access (const char *path, int amode)
 
int esp_vfs_rmdir (const char *name)
 
int esp_vfs_mkdir (const char *name, mode_t mode)
 
DIResp_vfs_opendir (const char *name)
 
int esp_vfs_closedir (DIR *pdir)
 
int esp_vfs_readdir_r (DIR *pdir, struct dirent *entry, struct dirent **out_dirent)
 
struct direntesp_vfs_readdir (DIR *pdir)
 
long esp_vfs_telldir (DIR *pdir)
 
void esp_vfs_seekdir (DIR *pdir, long loc)
 
void esp_vfs_rewinddir (DIR *pdir)
 
int esp_vfs_select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout)
 
void esp_vfs_select_triggered (esp_vfs_select_sem_t sem)
 
void esp_vfs_select_triggered_isr (esp_vfs_select_sem_t sem, int *woken)
 
ssize_t esp_vfs_pread (int fd, void *dst, size_t size, off_t offset)
 
ssize_t esp_vfs_pwrite (int fd, const void *src, size_t size, off_t offset)
 
void esp_vfs_dump_fds (FILE *fp)
 
void esp_vfs_dump_registered_paths (FILE *fp)
 

Macro Definition Documentation

◆ ESP_VFS_PATH_MAX

#define ESP_VFS_PATH_MAX   15

◆ MAX_FDS

#define MAX_FDS   FD_SETSIZE

◆ ESP_VFS_FLAG_DEFAULT

#define ESP_VFS_FLAG_DEFAULT   (1 << 0)

◆ ESP_VFS_FLAG_CONTEXT_PTR

#define ESP_VFS_FLAG_CONTEXT_PTR   (1 << 1)

◆ ESP_VFS_FLAG_READONLY_FS

#define ESP_VFS_FLAG_READONLY_FS   (1 << 2)

◆ ESP_VFS_FLAG_STATIC

#define ESP_VFS_FLAG_STATIC   (1 << 3)

Function Documentation

◆ esp_vfs_register()

esp_err_t esp_vfs_register ( const char *  base_path,
const esp_vfs_t vfs,
void *  ctx 
)
extern

◆ esp_vfs_unregister()

esp_err_t esp_vfs_unregister ( const char *  base_path)
extern

◆ esp_vfs_register_fd_range()

esp_err_t esp_vfs_register_fd_range ( const esp_vfs_t vfs,
void *  ctx,
int  min_fd,
int  max_fd 
)
extern

◆ esp_vfs_register_with_id()

esp_err_t esp_vfs_register_with_id ( const esp_vfs_t vfs,
void *  ctx,
esp_vfs_id_t vfs_id 
)
extern

◆ esp_vfs_unregister_with_id()

esp_err_t esp_vfs_unregister_with_id ( esp_vfs_id_t  vfs_id)
extern

◆ esp_vfs_register_fd()

esp_err_t esp_vfs_register_fd ( esp_vfs_id_t  vfs_id,
int *  fd 
)
extern

◆ esp_vfs_register_fd_with_local_fd()

esp_err_t esp_vfs_register_fd_with_local_fd ( esp_vfs_id_t  vfs_id,
int  local_fd,
bool  permanent,
int *  fd 
)
extern

◆ esp_vfs_unregister_fd()

esp_err_t esp_vfs_unregister_fd ( esp_vfs_id_t  vfs_id,
int  fd 
)
extern

◆ esp_vfs_write()

ssize_t esp_vfs_write ( struct _reent r,
int  fd,
const void *  data,
size_t  size 
)
extern

◆ esp_vfs_lseek()

off_t esp_vfs_lseek ( struct _reent r,
int  fd,
off_t  size,
int  mode 
)
extern

◆ esp_vfs_read()

ssize_t esp_vfs_read ( struct _reent r,
int  fd,
void *  dst,
size_t  size 
)
extern

◆ esp_vfs_open()

int esp_vfs_open ( struct _reent r,
const char *  path,
int  flags,
int  mode 
)
extern

◆ esp_vfs_close()

int esp_vfs_close ( struct _reent r,
int  fd 
)
extern

◆ esp_vfs_fstat()

int esp_vfs_fstat ( struct _reent r,
int  fd,
struct stat st 
)
extern

◆ esp_vfs_stat()

int esp_vfs_stat ( struct _reent r,
const char *  path,
struct stat st 
)
extern

◆ esp_vfs_link()

int esp_vfs_link ( struct _reent r,
const char *  n1,
const char *  n2 
)
extern

◆ esp_vfs_unlink()

int esp_vfs_unlink ( struct _reent r,
const char *  path 
)
extern

◆ esp_vfs_rename()

int esp_vfs_rename ( struct _reent r,
const char *  src,
const char *  dst 
)
extern

◆ esp_vfs_utime()

int esp_vfs_utime ( const char *  path,
const struct utimbuf times 
)
extern

◆ esp_vfs_fsync()

int esp_vfs_fsync ( int  fd)
extern

◆ esp_vfs_fcntl_r()

int esp_vfs_fcntl_r ( struct _reent r,
int  fd,
int  cmd,
int  arg 
)
extern

◆ esp_vfs_ioctl()

int esp_vfs_ioctl ( int  fd,
int  cmd,
  ... 
)
extern

◆ esp_vfs_truncate()

int esp_vfs_truncate ( const char *  path,
off_t  length 
)
extern

◆ esp_vfs_ftruncate()

int esp_vfs_ftruncate ( int  fd,
off_t  length 
)
extern

◆ esp_vfs_access()

int esp_vfs_access ( const char *  path,
int  amode 
)
extern

◆ esp_vfs_rmdir()

int esp_vfs_rmdir ( const char *  name)
extern

◆ esp_vfs_mkdir()

int esp_vfs_mkdir ( const char *  name,
mode_t  mode 
)
extern

◆ esp_vfs_opendir()

DIR * esp_vfs_opendir ( const char *  name)
extern

◆ esp_vfs_closedir()

int esp_vfs_closedir ( DIR pdir)
extern

◆ esp_vfs_readdir_r()

int esp_vfs_readdir_r ( DIR pdir,
struct dirent entry,
struct dirent **  out_dirent 
)
extern

◆ esp_vfs_readdir()

struct dirent * esp_vfs_readdir ( DIR pdir)
extern

◆ esp_vfs_telldir()

long esp_vfs_telldir ( DIR pdir)
extern

◆ esp_vfs_seekdir()

void esp_vfs_seekdir ( DIR pdir,
long  loc 
)
extern

◆ esp_vfs_rewinddir()

void esp_vfs_rewinddir ( DIR pdir)
extern

◆ esp_vfs_select()

int esp_vfs_select ( int  nfds,
fd_set readfds,
fd_set writefds,
fd_set errorfds,
struct timeval timeout 
)
extern

◆ esp_vfs_select_triggered()

void esp_vfs_select_triggered ( esp_vfs_select_sem_t  sem)
extern

◆ esp_vfs_select_triggered_isr()

void esp_vfs_select_triggered_isr ( esp_vfs_select_sem_t  sem,
int *  woken 
)
extern

◆ esp_vfs_pread()

ssize_t esp_vfs_pread ( int  fd,
void *  dst,
size_t  size,
off_t  offset 
)
extern

◆ esp_vfs_pwrite()

ssize_t esp_vfs_pwrite ( int  fd,
const void *  src,
size_t  size,
off_t  offset 
)
extern

◆ esp_vfs_dump_fds()

void esp_vfs_dump_fds ( FILE fp)
extern

◆ esp_vfs_dump_registered_paths()

void esp_vfs_dump_registered_paths ( FILE fp)
extern
Generated from commit: vsfteam/vsf@c3767bf