Open System Services Library Calls Reference Manual (G06.28+, H06.05+)

OSS Library Calls (n - r) nftw64(3)
NAME
nftw64 - Traverses a le tree
LIBRARY
G-series native OSS processes: /G/system/sysnn/zossesrl
H-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 ag,
struct FTW *sftw),
int depth,
int ags);
PARAMETERS
path Points to the directory hierarchy to be searched.
function Points to the function to be invoked for each le in the directory hierarchy.
object Points to the name of the next le in the directory hierarchy specied in the path
parameter. This name must be a null-terminated string.
ptr Points to a stat64 structure, as dened in the sys/stat.h header le. The stat64
structure contains information about the le specied in the object parameter.
flag Species the type of le. See DESCRIPTION.
depth Indicates the maximum number of directory streams, le descriptors, or both
available for use by the nftw64( ) function while traversing the tree. This param-
eter is ignored in the OSS implementation.
flags Species optional ags that modify the operation of the nftw64( ) function. The
following ags 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 le tree, but does not follow symbolic
links. If this ag is not specied, 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 elds of type
int:
base Contains the offset of the object lename 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-007 Hewlett-Packard Company 59