From d7409bbc5e24267b275692b48116254d842d3821 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 18 Feb 2021 11:38:44 +0100 Subject: fstree_from_file: Implement basic file globbing The base path is passed to the fstree_from_file function and in turn to the individual callbacks. The line parsing function is modified to allow '*' as mode, uid and gid for specifically marked callbacks. A glob callback is added that internally uses the fstree_from_dir scanning functions in combination with a filter callback. Directory scanning flags are parsed from the extra arguments before interpreting it as a path fragment. Signed-off-by: David Oberhollenzer --- include/fstree.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/fstree.h b/include/fstree.h index 35d6778..3cc4f48 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -183,7 +183,8 @@ tree_node_t *fstree_add_generic(fstree_t *fs, const char *path, Returns 0 on success. */ -int fstree_from_file(fstree_t *fs, const char *filename); +int fstree_from_file(fstree_t *fs, const char *filename, + const char *basepath); /* This function performs all the necessary post processing steps on the file -- cgit v1.2.3