#include <ftw.h>

ftw.h

$OpenBSD: ftw.h,v 1.1 2003/07/21 21:13:18 millert Exp $
includes: sys/stat.h, _bounds.h
11 macros · 2 functions · 1 struct

macroFTW_F

Valid flags for the 3rd argument to the function that is passed as the second argument to ftw(3) and nftw(3). Say it three times fast!
#define FTW_F 0
File.

macroFTW_D

#define FTW_D 1
Directory.

macroFTW_DNR

#define FTW_DNR 2
Directory without read permission.

macroFTW_DP

#define FTW_DP 3
Directory with subdirectories visited.

macroFTW_NS

#define FTW_NS 4
Unknown type; stat() failed.

macroFTW_SL

#define FTW_SL 5
Symbolic link.

macroFTW_SLN

#define FTW_SLN 6
Sym link that names a nonexistent file.

macroFTW_PHYS

Flags for use as the 4th argument to nftw(3). These may be ORed together.
#define FTW_PHYS 0x01
Physical walk, don't follow sym links.

macroFTW_MOUNT

#define FTW_MOUNT 0x02
The walk does not cross a mount point.

macroFTW_DEPTH

#define FTW_DEPTH 0x04
Subdirs visited before the dir itself.

macroFTW_CHDIR

#define FTW_CHDIR 0x08
Change to a directory before reading it.

structFTW

size 8, align 4
intbase
intlevel

functionftw

__DARWIN_ALIAS_I(ftw)
int ftw(const char *, int (*)(const char *, const struct stat *, int), int)

functionnftw

__DARWIN_ALIAS_I(nftw)
int nftw(
	const char *,
	int (*)(const char *, const struct stat *, int, struct FTW *),
	int,
	int
)