libdragon
|
Directory handling. More...
Go to the source code of this file.
Data Structures | |
struct | dir_t |
Directory entry structure. More... | |
Macros | |
Directory entry type definitions | |
#define | DT_REG 1 |
Regular file. | |
#define | DT_DIR 2 |
Directory. | |
Functions | |
int | dir_findfirst (const char *const path, dir_t *dir) |
Find the first file in a directory. | |
int | dir_findnext (const char *const path, dir_t *dir) |
Find the next file in a directory. | |
Directory handling.
int dir_findfirst | ( | const char *const | path, |
dir_t * | dir | ||
) |
Find the first file in a directory.
This function should be called to start enumerating a directory or whenever a directory enumeration should be restarted.
[in] | path | Path to the directory structure |
[out] | dir | Directory entry structure to populate with first entry |
int dir_findnext | ( | const char *const | path, |
dir_t * | dir | ||
) |
Find the next file in a directory.
After finding the first file in a directory using dir_findfirst, call this to retrieve the rest of the directory entries. Call this repeatedly until a negative error is returned signifying that there are no more directory entries in the directory.
[in] | path | Path to the directory structure |
[out] | dir | Directory entry structure to populate with next entry |