summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-12-10 16:00:44 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-12-10 16:00:44 +0100
commitf138e4a24919682cf477cf93ae47b9a89bb5a3f0 (patch)
tree300147af5d6d6c9a2e0cf9b49674ec9edf58f0fb /include
parentca61276fe9676670afe657c863257c01274c111a (diff)
Move fstree dirscan code back to libfstree
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/fstree.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/fstree.h b/include/fstree.h
index 884ff51..ac92daa 100644
--- a/include/fstree.h
+++ b/include/fstree.h
@@ -17,6 +17,12 @@
#include "sqfs/predef.h"
#include "compat.h"
+enum {
+ DIR_SCAN_KEEP_TIME = 0x01,
+
+ DIR_SCAN_ONE_FILESYSTEM = 0x02,
+};
+
#define FSTREE_MODE_HARD_LINK (0)
#define FSTREE_MODE_HARD_LINK_RESOLVED (1)
@@ -230,4 +236,11 @@ tree_node_t *fstree_add_hard_link(fstree_t *fs, const char *path,
*/
int fstree_resolve_hard_link(fstree_t *fs, tree_node_t *node);
+/*
+ Recursively scan a directory to build a file system tree.
+
+ Returns 0 on success, prints to stderr on failure.
+ */
+int fstree_from_dir(fstree_t *fs, const char *path, unsigned int flags);
+
#endif /* FSTREE_H */