...
The listing below gives an example using the directory access functions to list the files in a directory.
An example result of listing a directory is shown in the example directory listing figure below.
The second argument fs_readdir_r()
, is a pointer to a struct fs_dirent
, which has two members. The first is Name, which holds the name of the entry; the second is Info, which has file information. For more information about the struct fs_dirent
structure, see FS_DIR_ENTRY (struct fs_dirent).