#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
Go to the source code of this file.
Data Structures | |
struct | FTS |
struct | _ftsent |
Defines | |
#define | _FTS_H 1 |
#define | __THROW |
#define | __BEGIN_DECLS |
#define | __END_DECLS |
#define | FTS_COMFOLLOW 0x0001 /*!< follow command line symlinks */ |
#define | FTS_LOGICAL 0x0002 /*!< logical walk */ |
#define | FTS_NOCHDIR 0x0004 /*!< don't change directories */ |
#define | FTS_NOSTAT 0x0008 /*!< don't get stat info */ |
#define | FTS_PHYSICAL 0x0010 /*!< physical walk */ |
#define | FTS_SEEDOT 0x0020 /*!< return dot and dot-dot */ |
#define | FTS_XDEV 0x0040 /*!< don't cross devices */ |
#define | FTS_WHITEOUT 0x0080 /*!< return whiteout information */ |
#define | FTS_OPTIONMASK 0x00ff /*!< valid user option mask */ |
#define | FTS_NAMEONLY 0x0100 /*!< (private) child names only */ |
#define | FTS_STOP 0x0200 /*!< (private) unrecoverable error */ |
#define | FTS_ROOTPARENTLEVEL -1 |
#define | FTS_ROOTLEVEL 0 |
#define | FTS_D 1 /*!< preorder directory */ |
#define | FTS_DC 2 /*!< directory that causes cycles */ |
#define | FTS_DEFAULT 3 /*!< none of the above */ |
#define | FTS_DNR 4 /*!< unreadable directory */ |
#define | FTS_DOT 5 /*!< dot or dot-dot */ |
#define | FTS_DP 6 /*!< postorder directory */ |
#define | FTS_ERR 7 /*!< error; errno is set */ |
#define | FTS_F 8 /*!< regular file */ |
#define | FTS_INIT 9 /*!< initialized only */ |
#define | FTS_NS 10 /*!< stat(2) failed */ |
#define | FTS_NSOK 11 /*!< no stat(2) requested */ |
#define | FTS_SL 12 /*!< symbolic link */ |
#define | FTS_SLNONE 13 /*!< symbolic link without target */ |
#define | FTS_W 14 /*!< whiteout object */ |
#define | FTS_DONTCHDIR 0x01 /*!< don't chdir .. to the parent */ |
#define | FTS_SYMFOLLOW 0x02 /*!< followed a symlink to get here */ |
#define | FTS_AGAIN 1 /*!< read node again */ |
#define | FTS_FOLLOW 2 /*!< follow symbolic link */ |
#define | FTS_NOINSTR 3 /*!< no instructions */ |
#define | FTS_SKIP 4 /*!< discard node */ |
Typedefs | |
typedef _ftsent | FTSENT |
Functions | |
FTSENT * | Fts_children (FTS *sp, int instr) |
Return list of children of the current node. | |
int | Fts_close (FTS *sp) |
Destroy a file hierarchy traversal handle. | |
FTS * | Fts_open (char *const *argv, int options, int(*compar)(const FTSENT **, const FTSENT **)) |
Create a handle for file hierarchy traversal. | |
FTSENT * | Fts_read (FTS *sp) |
Return next node in the file hierarchy traversal. | |
int | Fts_set (FTS *sp, FTSENT *p, int instr) |
Modify the traversal for a file set member. |
|
|
|
|
|
|
|
|
|
read node again Definition at line 186 of file fts.h. Referenced by Fts_read(), and rpmfts_new(). |
|
follow command line symlinks Definition at line 97 of file fts.h. Referenced by main(), recurseDir(), rpmfts_initialize(), and rpmfts_new(). |
|
preorder directory Definition at line 150 of file fts.h. Referenced by ftsPrint(), recurseDir(), and rpmfts_new(). |
|
directory that causes cycles Definition at line 152 of file fts.h. Referenced by ftsPrint(), recurseDir(), and rpmfts_new(). |
|
none of the above Definition at line 154 of file fts.h. Referenced by ftsPrint(), recurseDir(), and rpmfts_new(). |
|
unreadable directory Definition at line 156 of file fts.h. Referenced by fts_build(), ftsPrint(), recurseDir(), and rpmfts_new(). |
|
don't chdir .. to the parent Definition at line 180 of file fts.h. Referenced by rpmfts_new(). |
|
dot or dot-dot Definition at line 158 of file fts.h. Referenced by ftsPrint(), recurseDir(), and rpmfts_new(). |
|
postorder directory Definition at line 160 of file fts.h. Referenced by ftsPrint(), recurseDir(), rpmfts_initialize(), and rpmfts_new(). |
|
error; errno is set Definition at line 162 of file fts.h. Referenced by ftsPrint(), recurseDir(), and rpmfts_new(). |
|
regular file Definition at line 164 of file fts.h. Referenced by ftsPrint(), recurseDir(), and rpmfts_new(). |
|
follow symbolic link Definition at line 188 of file fts.h. Referenced by rpmfts_new(). |
|
initialized only Definition at line 166 of file fts.h. Referenced by ftsPrint(), and recurseDir(). |
|
logical walk Definition at line 99 of file fts.h. Referenced by main(), rpmfts_initialize(), and rpmfts_new(). |
|
(private) child names only Definition at line 116 of file fts.h. Referenced by Fts_children(), and rpmfts_new(). |
|
don't change directories Definition at line 101 of file fts.h. Referenced by recurseDir(), and rpmfts_new(). |
|
no instructions Definition at line 190 of file fts.h. Referenced by fts_alloc(), Fts_read(), Fts_set(), and rpmfts_new(). |
|
don't get stat info Definition at line 103 of file fts.h. Referenced by main(), rpmfts_initialize(), and rpmfts_new(). |
|
stat(2) failed Definition at line 168 of file fts.h. Referenced by ftsPrint(), recurseDir(), and rpmfts_new(). |
|
no stat(2) requested Definition at line 170 of file fts.h. Referenced by ftsPrint(), recurseDir(), and rpmfts_new(). |
|
valid user option mask Definition at line 113 of file fts.h. Referenced by Fts_open(), and rpmfts_new(). |
|
physical walk Definition at line 105 of file fts.h. Referenced by recurseDir(), and rpmfts_new(). |
|
Definition at line 147 of file fts.h. Referenced by Fts_close(), fts_padjust(), and rpmfts_new(). |
|
Definition at line 146 of file fts.h. Referenced by rpmfts_new(). |
|
return dot and dot-dot Definition at line 107 of file fts.h. Referenced by rpmfts_new(). |
|
discard node Definition at line 192 of file fts.h. Referenced by Fts_set(), ftsPrint(), and rpmfts_new(). |
|
symbolic link Definition at line 172 of file fts.h. Referenced by ftsPrint(), recurseDir(), and rpmfts_new(). |
|
symbolic link without target Definition at line 174 of file fts.h. Referenced by ftsPrint(), recurseDir(), and rpmfts_new(). |
|
(private) unrecoverable error Definition at line 118 of file fts.h. Referenced by rpmfts_new(). |
|
followed a symlink to get here Definition at line 182 of file fts.h. Referenced by rpmfts_new(). |
|
whiteout object Definition at line 176 of file fts.h. Referenced by fts_stat(), ftsPrint(), recurseDir(), and rpmfts_new(). |
|
return whiteout information Definition at line 111 of file fts.h. Referenced by rpmfts_new(). |
|
don't cross devices Definition at line 109 of file fts.h. Referenced by rpmfts_new(). |
|
Referenced by fts_build(), Fts_open(), Fts_read(), ftsPrint(), ftsStashLatest(), main(), recurseDir(), and rpmfts_state(). |
|
Return list of children of the current node.
< (private) child names only < (private) unrecoverable error < initialized only < preorder directory < (private) child names only < (private) child names only < don't change directories Definition at line 574 of file fts.c. References __set_errno, and FTS_NAMEONLY. Referenced by rpmfts_Children(). |
|
Destroy a file hierarchy traversal handle.
< don't change directories Definition at line 300 of file fts.c. References FTS::fts_cur, _ftsent::fts_level, _ftsent::fts_link, _ftsent::fts_parent, and FTS_ROOTLEVEL. Referenced by main(), recurseDir(), and rpmfts_state(). |
|
Create a handle for file hierarchy traversal.
< valid user option mask < logical walk < don't change directories < don't change directories < follow command line symlinks < dot or dot-dot < preorder directory < initialized only < don't change directories < don't change directories Definition at line 133 of file fts.c. References __set_errno, FTS_OPTIONMASK, and FTSENT. Referenced by main(), recurseDir(), and rpmfts_state(). |
|
Return next node in the file hierarchy traversal.
< (private) unrecoverable error < no instructions < read node again < follow symbolic link < symbolic link < symbolic link without target < preorder directory < don't change directories < error; errno is set < followed a symlink to get here < preorder directory < discard node < don't cross devices < followed a symlink to get here < postorder directory < (private) child names only < (private) child names only < don't chdir .. to the parent < (private) unrecoverable error < don't change directories < (private) unrecoverable error < discard node < follow symbolic link < preorder directory < don't change directories < error; errno is set < followed a symlink to get here < no instructions < don't change directories < (private) unrecoverable error < followed a symlink to get here < don't change directories < (private) unrecoverable error < don't chdir .. to the parent < (private) unrecoverable error < error; errno is set < postorder directory Definition at line 361 of file fts.c. References FTS_AGAIN, _ftsent::fts_info, FTS_NOINSTR, fts_stat(), and FTSENT. Referenced by main(), recurseDir(), and rpmfts_step(). |
|
Modify the traversal for a file set member.
< read node again < follow symbolic link < no instructions < discard node Definition at line 560 of file fts.c. References __set_errno, FTS_NOINSTR, and FTS_SKIP. Referenced by ftsPrint(), and rpmfts_Set(). |