1<ftw.h>(P)                 POSIX Programmer's Manual                <ftw.h>(P)
2
3
4

NAME

6       ftw.h - file tree traversal
7

SYNOPSIS

9       #include <ftw.h>
10

DESCRIPTION

12       The  <ftw.h>  header  shall  define  the FTW structure that includes at
13       least the following members:
14
15
16              int  base
17              int  level
18
19       The <ftw.h> header shall define macros for use as values of  the  third
20       argument  to  the  application-supplied  function that is passed as the
21       second argument to ftw() and nftw():
22
23       FTW_F  File.
24
25       FTW_D  Directory.
26
27       FTW_DNR
28              Directory without read permission.
29
30       FTW_DP Directory with subdirectories visited.
31
32       FTW_NS Unknown type; stat() failed.
33
34       FTW_SL Symbolic link.
35
36       FTW_SLN
37              Symbolic link that names a nonexistent file.
38
39
40       The <ftw.h> header shall define macros for use as values of the  fourth
41       argument to nftw():
42
43       FTW_PHYS
44              Physical walk, does not follow symbolic links. Otherwise, nftw()
45              follows links but does not  walk  down  any  path  that  crosses
46              itself.
47
48       FTW_MOUNT
49              The walk does not cross a mount point.
50
51       FTW_DEPTH
52              All subdirectories are visited before the directory itself.
53
54       FTW_CHDIR
55              The walk changes to each directory before reading it.
56
57
58       The following shall be declared as functions and may also be defined as
59       macros. Function prototypes shall be provided.
60
61
62              int ftw(const char *, int (*)(const char *, const struct stat *,
63                  int), int);
64              int nftw(const char *, int (*)(const char *, const struct stat *,
65                  int, struct FTW*), int, int);
66
67       The <ftw.h> header shall define the stat  structure  and  the  symbolic
68       names  for  st_mode  and  the  file  type  test  macros as described in
69       <sys/stat.h> .
70
71       Inclusion of the <ftw.h> header may also make visible all symbols  from
72       <sys/stat.h>.
73
74       The following sections are informative.
75

APPLICATION USAGE

77       None.
78

RATIONALE

80       None.
81

FUTURE DIRECTIONS

83       None.
84

SEE ALSO

86       <sys/stat.h>  ,  the  System Interfaces volume of IEEE Std 1003.1-2001,
87       ftw(), nftw()
88
90       Portions of this text are reprinted and reproduced in  electronic  form
91       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
92       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
93       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
94       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
95       event of any discrepancy between this version and the original IEEE and
96       The Open Group Standard, the original IEEE and The Open Group  Standard
97       is  the  referee document. The original Standard can be obtained online
98       at http://www.opengroup.org/unix/online.html .
99
100
101
102IEEE/The Open Group                  2003                           <ftw.h>(P)
Impressum