aboutsummaryrefslogtreecommitdiff
path: root/include/fstree.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-12-15 11:07:12 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-12-15 11:07:12 +0100
commitefa204aedf3578d193b2832b42cf365c7aee48f9 (patch)
tree310f5e01aa656aeaf791808e14033eb3d40b5ea0 /include/fstree.h
parentf138e4a24919682cf477cf93ae47b9a89bb5a3f0 (diff)
libfstree: make the directory scanning code a little more generic
- Instead of using the fstree root, let the caller specify it. - Add a flag to prevent recursion into sub directories. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/fstree.h')
-rw-r--r--include/fstree.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/fstree.h b/include/fstree.h
index ac92daa..f6ff75f 100644
--- a/include/fstree.h
+++ b/include/fstree.h
@@ -21,6 +21,8 @@ enum {
DIR_SCAN_KEEP_TIME = 0x01,
DIR_SCAN_ONE_FILESYSTEM = 0x02,
+
+ DIR_SCAN_NO_RECURSION = 0x04,
};
#define FSTREE_MODE_HARD_LINK (0)
@@ -241,6 +243,7 @@ int fstree_resolve_hard_link(fstree_t *fs, tree_node_t *node);
Returns 0 on success, prints to stderr on failure.
*/
-int fstree_from_dir(fstree_t *fs, const char *path, unsigned int flags);
+int fstree_from_dir(fstree_t *fs, tree_node_t *root,
+ const char *path, unsigned int flags);
#endif /* FSTREE_H */