netatalk: ftw.h File Reference

netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
ftw.h File Reference
`#include <sys/stat.h>`
`#include <sys/types.h>`

Go to the source code of this file.

## Data Structures
struct | FTW

## Macros
#define | FTW_F FTW_F
#define | FTW_D FTW_D
#define | FTW_DNR FTW_DNR
#define | FTW_NS FTW_NS
#define | FTW_SL FTW_SL
#define | FTW_DP FTW_DP
#define | FTW_SLN FTW_SLN
#define | FTW_PHYS FTW_PHYS
#define | FTW_MOUNT FTW_MOUNT
#define | FTW_CHDIR FTW_CHDIR
#define | FTW_DEPTH FTW_DEPTH
#define | FTW_ACTIONRETVAL FTW_ACTIONRETVAL
#define | FTW_CONTINUE FTW_CONTINUE
#define | FTW_STOP FTW_STOP
#define | FTW_SKIP_SUBTREE FTW_SKIP_SUBTREE
#define | FTW_SKIP_SIBLINGS FTW_SKIP_SIBLINGS

## Typedefs
typedef int(* | nftw_func_t) (const char *filename, const struct stat *status, int flag, struct FTW *info)
typedef void(* | dir_notification_func_t) (void)

## Enumerations
enum | { FTW_F , FTW_F , FTW_D , FTW_D , FTW_DNR , FTW_DNR , FTW_NS , FTW_NS , FTW_SL , FTW_SL , FTW_DP , FTW_DP }
enum | { FTW_PHYS = 1 , FTW_PHYS = 1 , FTW_MOUNT = 2 , FTW_MOUNT = 2 , FTW_CHDIR = 4 , FTW_CHDIR = 4 , FTW_DEPTH = 8 , FTW_DEPTH = 8 , FTW_ACTIONRETVAL }
enum | { FTW_CONTINUE = 0 , FTW_CONTINUE = 0 , FTW_STOP = 1 , FTW_STOP = 1 , FTW_SKIP_SUBTREE = 2 , FTW_SKIP_SUBTREE = 2 , FTW_SKIP_SIBLINGS = 3 , FTW_SKIP_SIBLINGS = 3 }

## Functions
int | nftw (const char *dir, nftw_func_t func, dir_notification_func_t up, int descriptors, int flag)

## Macro Definition Documentation

## ◆ FTW_ACTIONRETVAL

#define FTW_ACTIONRETVAL FTW_ACTIONRETVAL

## ◆ FTW_CHDIR

#define FTW_CHDIR FTW_CHDIR

## ◆ FTW_CONTINUE

#define FTW_CONTINUE FTW_CONTINUE

## ◆ FTW_D

#define FTW_D FTW_D

## ◆ FTW_DEPTH

#define FTW_DEPTH FTW_DEPTH

## ◆ FTW_DNR

#define FTW_DNR FTW_DNR

## ◆ FTW_DP

#define FTW_DP FTW_DP

## ◆ FTW_F

#define FTW_F FTW_F

## ◆ FTW_MOUNT

#define FTW_MOUNT FTW_MOUNT

## ◆ FTW_NS

#define FTW_NS FTW_NS

## ◆ FTW_PHYS

#define FTW_PHYS FTW_PHYS

## ◆ FTW_SKIP_SIBLINGS

#define FTW_SKIP_SIBLINGS FTW_SKIP_SIBLINGS

## ◆ FTW_SKIP_SUBTREE

#define FTW_SKIP_SUBTREE FTW_SKIP_SUBTREE

## ◆ FTW_SL

#define FTW_SL FTW_SL

## ◆ FTW_SLN

#define FTW_SLN FTW_SLN

Symbolic link naming non-existing file.

## ◆ FTW_STOP

#define FTW_STOP FTW_STOP

## Typedef Documentation

## ◆ dir_notification_func_t

typedef void(* dir_notification_func_t) (void)

## ◆ nftw_func_t

typedef int(* nftw_func_t) (const char *filename, const struct stat *status, int flag, struct FTW *info)

Convenient types for callback functions.

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Return values from callback functions.

Enumerator
FTW_CONTINUE | Continue with next sibling or for FTW_D with the first child.
FTW_CONTINUE | Continue with next sibling or for FTW_D with the first child.
FTW_STOP | Return from 'ftw' or 'nftw' with FTW_STOP as return value.
FTW_STOP | Return from 'ftw' or 'nftw' with FTW_STOP as return value.
FTW_SKIP_SUBTREE | Only meaningful for FTW_D: Don't walk through the subtree, instead just continue with its next sibling.
FTW_SKIP_SUBTREE | Only meaningful for FTW_D: Don't walk through the subtree, instead just continue with its next sibling.
FTW_SKIP_SIBLINGS | Continue with FTW_DP callback for current directory (if FTW_DEPTH) and then its siblings.
FTW_SKIP_SIBLINGS | Continue with FTW_DP callback for current directory (if FTW_DEPTH) and then its siblings.

## ◆ anonymous enum

anonymous enum

Flags for fourth argument of 'nftw'.

Enumerator
FTW_PHYS | Perform physical walk, ignore symlinks.
FTW_PHYS | Perform physical walk, ignore symlinks.
FTW_MOUNT | Report only files on same file system as the argument.
FTW_MOUNT | Report only files on same file system as the argument.
FTW_CHDIR | Change to current directory while processing it.
FTW_CHDIR | Change to current directory while processing it.
FTW_DEPTH | Report files in directory before directory itself.
FTW_DEPTH | Report files in directory before directory itself.
FTW_ACTIONRETVAL | Assume callback to return FTW_* values instead of zero to continue and non-zero to terminate.

## ◆ anonymous enum

anonymous enum

Values for the FLAG argument to the user function passed to 'ftw' and 'nftw'.

Enumerator
FTW_F | Regular file.
FTW_F | Regular file.
FTW_D | Directory.
FTW_D | Directory.
FTW_DNR | Unreadable directory.
FTW_DNR | Unreadable directory.
FTW_NS | Unstatable file.
FTW_NS | Unstatable file.
FTW_SL | Symbolic link.
FTW_SL | Symbolic link.
FTW_DP | Directory, all subdirs have been visited.
FTW_DP | Directory, all subdirs have been visited.

## Function Documentation

## ◆ nftw()

int nftw | ( | const char * | dir,
|  | nftw_func_t | func,
|  | dir_notification_func_t | up,
|  | int | descriptors,
|  | int | flag )
| extern