The friendly Operating System for the Internet of Things
vfs_dir_ops Struct Reference

Operations on open directories. More...

Detailed Description

Definition at line 354 of file vfs.h.

#include <vfs.h>

Data Fields

int(* opendir )(vfs_DIR *dirp, const char *dirname, const char *abs_path)
 Open a directory for reading with readdir. More...
 
int(* readdir )(vfs_DIR *dirp, vfs_dirent_t *entry)
 Read a single entry from the open directory dirp and advance the read position by one. More...
 
int(* closedir )(vfs_DIR *dirp)
 Close an open directory. More...
 

Field Documentation

int(* vfs_dir_ops::closedir) (vfs_DIR *dirp)
Parameters
[in]dirppointer to open directory
Returns
0 on success
<0 on error, the directory stream dirp should be considered invalid

Definition at line 396 of file vfs.h.

int(* vfs_dir_ops::opendir) (vfs_DIR *dirp, const char *dirname, const char *abs_path)
Parameters
[in]dirppointer to open directory
[in]namenull-terminated name of the dir to open, relative to the file system root, including a leading slash
[in]abs_pathnull-terminated name of the dir to open, relative to the VFS root ("/")
Returns
0 on success
<0 on error

Definition at line 365 of file vfs.h.

int(* vfs_dir_ops::readdir) (vfs_DIR *dirp, vfs_dirent_t *entry)

entry will be populated with information about the next entry in the directory stream dirp

If entry was updated successfully, readdir shall return 1.

If the end of stream was reached, readdir shall return 0 and entry shall remain untouched.

Parameters
[in]dirppointer to open directory
[out]entrydirectory entry information
Returns
1 if entry was updated
0 if dirp has reached the end of the directory index
<0 on error

Definition at line 386 of file vfs.h.


The documentation for this struct was generated from the following file: