diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2015-08-30 14:38:01 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2015-08-30 14:38:01 -0400 |
commit | e24ffc3a9ea195016a9543d9cc4bf99049f245ce (patch) | |
tree | c0c3eafca7a2938bffec2ff128ee80422eea17f1 /bftw.h | |
parent | da4b02f9d020f1d701e22921702b156d3c810f4c (diff) | |
download | bfs-e24ffc3a9ea195016a9543d9cc4bf99049f245ce.tar.xz |
Add -type support.
Fixes #2.
Diffstat (limited to 'bftw.h')
-rw-r--r-- | bftw.h | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -66,16 +66,24 @@ typedef int bftw_fn(const char *fpath, const struct BFTW *ftwbuf, void *ptr); */ int bftw(const char *dirpath, bftw_fn *fn, int nopenfd, int flags, void *ptr); +/** typeflag: Block device. */ +#define BFTW_BLK 0 +/** typeflag: Character device. */ +#define BFTW_CHR 1 /** typeflag: Directory. */ -#define BFTW_D 0 -/** typeflag: Regular file. */ -#define BFTW_R 1 +#define BFTW_DIR 2 +/** typeflag: Pipe. */ +#define BFTW_FIFO 3 /** typeflag: Symbolic link. */ -#define BFTW_SL 2 +#define BFTW_LNK 4 +/** typeflag: Regular file. */ +#define BFTW_REG 5 +/** typeflag: Socket. */ +#define BFTW_SOCK 6 /** typeflag: Unknown type. */ -#define BFTW_UNKNOWN 3 +#define BFTW_UNKNOWN 7 /** typeflag: An error occurred for this file. */ -#define BFTW_ERROR 4 +#define BFTW_ERROR 8 /** action: Keep walking. */ #define BFTW_CONTINUE 0 |