Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

OSS Library Calls (n - r) nftw64(3)
NAME
nftw64 - Traverses a file tree
LIBRARY
G-series native OSS processes: /G/system/sysnn/zossesrl
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zossedll |
SYNOPSIS
#include <ftw.h>
int nftw64(
const char *path,
int(*function)
(const char *object,
const struct stat64 *ptr,
int flag,
struct FTW *sftw),
int depth,
int flags);
PARAMETERS
path Points to the directory hierarchy to be searched.
function Points to the function to be invoked for each file in the directory hierarchy.
object Points to the name of the next file in the directory hierarchy specified in the path
parameter. This name must be a null-terminated string.
ptr Points to a stat64 structure, as defined in the sys/stat.h header file. The stat64
structure contains information about the file specified in the object parameter.
flag Specifies the type of file. See DESCRIPTION.
depth Indicates the maximum number of directory streams, file descriptors, or both
available for use by the nftw64( ) function while traversing the tree. This param-
eter is ignored in the OSS implementation.
flags Specifies optional flags that modify the operation of the nftw64( ) function. The
following flags can be logically ORed to create the value for this parameter:
FTW_CHDIR Changes to each directory before reading its contents.
FTW_DEPTH Traverses all subdirectories before the directory itself.
FTW_MOUNT
Does not cross mount points during traversal.
FTW_PHYS Physically traverses the file tree, but does not follow symbolic
links. If this flag is not specified, nftw64( ) does follow symbolic
links but does not go down any path that crosses itself.
sftw Points to an FTW structure. This structure contains the following fields of type
int:
base Contains the offset of the object filename in the pathname
passed in the path parameter.
level Contains the depth relative to the root of the search. The level
of the root of the search is 0 (zero).
527187-017 Hewlett-Packard Company 525