int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), int ndirs);
int ftw64(const char *path, int (*fn)(const char *, const struct stat64 *, int), int ndirs);
For a directory.
For a directory that cannot be read.
For a file.
For an object on which
stat()could not be successfully executed.
If the flag is FTW_DNR, descendants of the directory are not be processed. If the flag is FTW_NS, the stat structure contains undefined values. An example of an object that would cause FTW_NS to be passed to the specified function would be a file in a directory with read but without execute (search) permission.
The tree traversal continues until the tree is exhausted, the user-supplied
function returns a non-zero value, or some error, other than
EACCES, is detected within
Specifies the root of the directory hierarchy to be traversed.
Is the function to be called for each element of the tree.
Specifies the maximum number of directory streams or file descriptors (or both) that are available for use by
ftw()while traversing the tree. This should be in the range of [1, OPEN_MAX].
Search permission is denied for any component of path or read permission is denied for path.
The value specified for ndirs is invalid.
The length of path exceeds PATH_MAX, or a path name component is longer than NAME_MAX, or either condition holds for a path name generated during the tree traversal.
path points to an empty string or to the name of a file that does not exist.
Insufficient memory is available to complete the request.
A component of the path name prefix is not a directory.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.3 Documentation Build 39.