#include <fts.h>
fts.h
structFTS
| struct _ftsent * | fts_cur | current node |
| struct _ftsent * | fts_child | linked list of children |
| struct _ftsent ** | fts_array | sort array |
| dev_t | fts_dev | starting device # |
| char * | fts_path | path for this descent |
| int | fts_rfd | fd for root |
| int | fts_pathlen | sizeof(path) |
| int | fts_nitems | elements in the sort array |
| int | fts_options | fts_open options, global flags |
typedefFTS
typedef struct FTS FTS;
macroFTS_COMFOLLOWDIR
#define FTS_COMFOLLOWDIR 0x400
(non-std) follow command line symlinks for directories only
macroFTS_NOSTAT_TYPE
#define FTS_NOSTAT_TYPE 0x800
(non-std) no stat, but use d_type in struct dirent when available
struct_ftsent
| struct _ftsent * | fts_cycle | cycle node |
| struct _ftsent * | fts_parent | parent directory |
| struct _ftsent * | fts_link | next file in directory |
| long | fts_number | local numeric value |
| void * | fts_pointer | local address value |
| char * | fts_accpath | access path |
| char * | fts_path | root path |
| int | fts_errno | errno for this node |
| int | fts_symfd | fd for symlink or chdir |
| unsigned short | fts_pathlen | strlen(fts_path) |
| unsigned short | fts_namelen | strlen(fts_name) |
| ino_t | fts_ino | inode |
| dev_t | fts_dev | device |
| nlink_t | fts_nlink | link count |
| short | fts_level | depth (-1 to N) |
| unsigned short | fts_info | user flags for FTSENT structure |
| unsigned short | fts_flags | private flags for FTSENT structure |
| unsigned short | fts_instr | fts_set() instructions |
| struct stat * | fts_statp | stat(2) information |
| char[1] | fts_name | file name, unsafe with -fbounds-safety |
macroFTS_ROOTPARENTLEVEL
#define FTS_ROOTPARENTLEVEL -1
macroFTS_ROOTLEVEL
#define FTS_ROOTLEVEL 0
macroFTS_MAXLEVEL
#define FTS_MAXLEVEL 0x7fffffff
functionfts_children
__DARWIN_INODE64(fts_children) FTSENT *fts_children(FTS *, int)
functionfts_open
__DARWIN_INODE64(fts_open) FTS *fts_open(char *_LIBC_CSTR const *, int, int (*)(const FTSENT **, const FTSENT **))
functionfts_open_b
__DARWIN_INODE64(fts_open_b) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2) FTS *fts_open_b( char *_LIBC_CSTR const *, int, int (^)(const FTSENT **, const FTSENT **) __fts_noescape )