diff options
| author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2021-02-18 21:50:36 +0100 | 
|---|---|---|
| committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2021-02-18 23:50:46 +0100 | 
| commit | 9e510d4ae6dbad555a3416fbe041f4aa8189cbde (patch) | |
| tree | c0076c297f7039697c79174879e6d08703ae3bdd /include | |
| parent | b3051223fcafc954767058811d279f5b6941a9ba (diff) | |
libfstree: add a subdirectory scanning function
So we can scan a sub-directory within a the base directory without
having to do string operations first.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
| -rw-r--r-- | include/fstree.h | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/include/fstree.h b/include/fstree.h index 193cecb..e5fc966 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -254,4 +254,13 @@ int fstree_resolve_hard_link(fstree_t *fs, tree_node_t *node);  int fstree_from_dir(fstree_t *fs, tree_node_t *root,  		    const char *path, unsigned int flags); +/* +  Same as fstree_from_dir, but scans a sub-directory inside the specified path. + +  Returns 0 on success, prints to stderr on failure. + */ +int fstree_from_subdir(fstree_t *fs, tree_node_t *root, +		       const char *path, const char *subdir, +		       unsigned int flags); +  #endif /* FSTREE_H */ | 
