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 <features.h>
10#include <sys/stat.h>
11
12
13#define	FTW_F		0
14#define	FTW_D		1
15#define	FTW_DNR		2
16#define	FTW_DP		3
17#define	FTW_NS		4
18#define	FTW_SL		5
19#define	FTW_SLN		6
20
21#define	FTW_PHYS	0x01
22#define	FTW_MOUNT	0x02
23#define	FTW_DEPTH	0x04
24#define	FTW_CHDIR	0x08
25
26struct FTW {
27	int base;
28	int level;
29};
30
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36int	ftw(const char *, int (*)(const char *, const struct stat *, int), int);
37int	nftw(const char *, int (*)(const char *, const struct stat *, int,
38	struct FTW *), int, int);
39
40#ifdef __cplusplus
41}
42#endif
43
44#endif	/* _FTW_H_ */
45