Regular File. Valid flags for the 3rd argument to the function that is passed as the second argument to ftw(3) and nftw(3).
Valid flags for the 3rd argument to the function that is passed as the second argument to ftw(3) and nftw(3). Directory.
Valid flags for the 3rd argument to the function that is passed as the second argument to ftw(3) and nftw(3). Directory without read permission.
Valid flags for the 3rd argument to the function that is passed as the second argument to ftw(3) and nftw(3). Directory with subdirectories visited. A file on which stat could not successfully be executed.
Valid flags for the 3rd argument to the function that is passed as the second argument to ftw(3) and nftw(3). A file on which stat could not successfully be executed.
Valid flags for the 3rd argument to the function that is passed as the second argument to ftw(3) and nftw(3). Symbolic link.
Valid flags for the 3rd argument to the function that is passed as the second argument to ftw(3) and nftw(3). Sym link that names a nonexistent file.
Flags for use as the 4th argument to nftw(3). These may be ORed together. Physical walk, don't follow sym links.
Flags for use as the 4th argument to nftw(3). These may be ORed together. The walk does not cross a mount point.
Flags for use as the 4th argument to nftw(3). These may be ORed together. Subdirs visited before the dir itself.
Flags for use as the 4th argument to nftw(3). These may be ORed together. Change to a directory before reading it.
IMPORT_C int | ftw | ( | const char * | , |
int(*)(const char *, const struct stat *, int) | , | |||
int | ||||
) |
The ftw() function shall recursively descend the directory hierarchy rooted in path. For each object in the hierarchy, ftw() shall call the function pointed to by fn, passing it a pointer to a null-terminated character string containing the name of the object, a pointer to a stat structure containing information about the object, and an integer.Possible values of the integer are: FTW_D For a directory. FTW_DNR For a directory that cannot be read. FTW_F For a file. FTW_SL For a symbolic link (but see also FTW_NS below). FTW_NS For an object other than a symbolic link on which stat() could not successfully be executed. If the object is a symbolic link and stat() failed, it is unspecified whether ftw() passes FTW_SL or FTW_NS to the user-supplied function.
The argument nfds should be in the range [1, {OPEN_MAX}].
Errors: [EACCES] Search permission is denied for any component of path or read permission is denied for path. [ELOOP] A loop exists in symbolic links encountered during resolution of the path argument. [ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}. [ENOENT] A component of path does not name an existing file or path is an empty string. [ENOTDIR] A component of path is not a directory. [EOVERFLOW] A field in the stat structure cannot be represented correctly in the current programming environment for one or more files found in the file hierarchy.
/* Detailed description: Sample usage of ftw system call Preconditions: Function fn with the specified prototype should be defined and should have atleast two objects in the current working directory. */ #include <ftw.h> #include <stdlib.h> #include <stdio.h> if (ftw(".", fn, 2) != 0) { perror("ftw"); exit(2); } else { printf("ftw call succeded"); }Output
ftw call succeded
See also: stat()
Capability | |
---|---|
Deferred | RFs::Entry(const TDesC16&, TEntry&) |