diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-07-18 20:44:01 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-08-10 09:28:27 +0200 |
commit | 9d431639effb4e33169110031a689fd1e9d435cf (patch) | |
tree | 21786f15f3336fa0a4d73272b6ea142996741279 /include | |
parent | 0a1d93062463133e6f40e3398c0fe53371c47ab0 (diff) |
Split recursive directory iterator
The recursive part and the filter part are split up, the recursive
iterator wrapper is moved into libsquashfs and the libio iterator
is modified to use that internally instead of implementig the
recursion step.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r-- | include/sqfs/io.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/sqfs/io.h b/include/sqfs/io.h index e851ea1..f148502 100644 --- a/include/sqfs/io.h +++ b/include/sqfs/io.h @@ -606,6 +606,23 @@ SQFS_API int sqfs_dir_iterator_create_native(sqfs_dir_iterator_t **out, const char *path, sqfs_u32 flags); +/** + * @brief Construct a recursive directory iterator + * + * @memberof sqfs_dir_iterator_t + * + * The recursive directory iterator automatcally enters sub directories + * and adds the parent path as prefix to the entries. The "." and ".." + * entries are filtered out. + * + * @param out Returns a pointer to a recursive directory iterator + * @param base The root directory iterator used as base + * + * @return Zero on success, an @ref SQFS_ERROR code on failure. + */ +SQFS_API int sqfs_dir_iterator_create_recursive(sqfs_dir_iterator_t **out, + sqfs_dir_iterator_t *base); + #ifdef __cplusplus } #endif |