walk_dir_tree()
#
Recursively walk through a directory tree and process each file and subdirectory.
Prototype
PUBLIC int walk_dir_tree(
const char *path,
int (*callback)(const char *path, void *user_data),
void *user_data
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The root directory to start walking. |
|
|
A function pointer to process each file or subdirectory. |
|
|
User-defined data passed to the callback function. |
Return Value
Returns 0
on success, or a negative value on failure.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples