1 /*
2 File: walk_tree.h
3
4 Copyright (C) 2007 Andreas Gruenbacher <a.gruenbacher@computer.org>
5
6 This program is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2.1 of the License, or (at
9 your option) any later version.
10
11 This program is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef __WALK_TREE_H
21 #define __WALK_TREE_H
22
23 #define WALK_TREE_RECURSIVE 0x01
24 #define WALK_TREE_PHYSICAL 0x02
25 #define WALK_TREE_LOGICAL 0x04
26 #define WALK_TREE_DEREFERENCE 0x08
27 #define WALK_TREE_DEREFERENCE_TOPLEVEL 0x10
28 #define WALK_TREE_ONE_FILESYSTEM 0x20
29
30 #define WALK_TREE_TOPLEVEL 0x100
31 #define WALK_TREE_SYMLINK 0x200
32 #define WALK_TREE_FAILED 0x400
33
34 struct stat;
35
36 extern int walk_tree(const char *path, int walk_flags, unsigned int num,
37 int (*func)(const char *, const struct stat *, int,
38 void *), void *arg);
39
40 #endif