summaryrefslogtreecommitdiff
path: root/include/fstree.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-17 11:35:04 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-17 11:35:04 +0200
commite5694858eac4c199022b822f41bc40d769f5aed9 (patch)
tree94e8b81812c7c3775dd0f7b54d371711c71775f8 /include/fstree.h
parentad83b0f167f3e65a2aa04cf358d1f995f1241a3c (diff)
libfstree: add generic function to add node from struct stat
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/fstree.h')
-rw-r--r--include/fstree.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/fstree.h b/include/fstree.h
index 23cf967..66a850e 100644
--- a/include/fstree.h
+++ b/include/fstree.h
@@ -200,6 +200,14 @@ tree_node_t *fstree_add_file(fstree_t *fs, const char *path, uint16_t mode,
const char *input);
/*
+ internally calls fstree_add or fstree_add_file depending on the given stat
+ structure and sets the link target for symlinks or input file for regular
+ files from the given extra string.
+*/
+tree_node_t *fstree_add_generic(fstree_t *fs, const char *path,
+ const struct stat *sb, const char *extra);
+
+/*
Add an extended attribute key value pair to a tree node.
Returns 0 on success, prints error to stderr on failure.