xref: /haiku/headers/posix/ftw.h (revision 8bacd281ba5156920f4b8cfa1da7520122beab78)
1 /*
2  * Copyright 2022, Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef	_FTW_H_
6 #define	_FTW_H_
7 
8 
9 #include <sys/stat.h>
10 
11 
12 #define	FTW_F		0
13 #define	FTW_D		1
14 #define	FTW_DNR		2
15 #define	FTW_DP		3
16 #define	FTW_NS		4
17 #define	FTW_SL		5
18 #define	FTW_SLN		6
19 
20 #define	FTW_PHYS	0x01
21 #define	FTW_MOUNT	0x02
22 #define	FTW_DEPTH	0x04
23 #define	FTW_CHDIR	0x08
24 
25 struct FTW {
26 	int base;
27 	int level;
28 };
29 
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 int	ftw(const char *, int (*)(const char *, const struct stat *, int), int);
36 int	nftw(const char *, int (*)(const char *, const struct stat *, int,
37 	struct FTW *), int, int);
38 
39 #ifdef __cplusplus
40 }
41 #endif
42 
43 
44 #endif	/* _FTW_H_ */
45