Lines Matching refs:dirtree
0 /* dirtree.c - Functions for dealing with directory trees.
17 int dirtree_notdotdot(struct dirtree *catch)
23 // Create a dirtree node from a path, with stat and symlink info.
27 struct dirtree *dirtree_add_node(struct dirtree *parent, char *name, int flags)
29 struct dirtree *dt = NULL;
45 dt = xzalloc((len = sizeof(struct dirtree)+len+1)+linklen);
74 char *dirtree_path(struct dirtree *node, int *plen)
94 int dirtree_parentfd(struct dirtree *node)
101 // By default, allocates a tree of struct dirtree, not following symlinks
103 // dirtree and return root of tree. Otherwise call callback(node) on each
107 struct dirtree *dirtree_handle_callback(struct dirtree *new,
108 int (*callback)(struct dirtree *node))
135 int dirtree_recurse(struct dirtree *node,
136 int (*callback)(struct dirtree *node), int flags)
138 struct dirtree *new, **ddt = &(node->child);
179 // Create dirtree root
180 struct dirtree *dirtree_start(char *name, int symfollow)
185 // Create dirtree from path, using callback to filter nodes.
186 // If callback == NULL allocate a tree of struct dirtree nodes and return
189 struct dirtree *dirtree_read(char *path, int (*callback)(struct dirtree *node))
191 struct dirtree *root = dirtree_start(path, 0);