diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2015-09-08 14:54:15 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2015-09-08 17:04:53 -0400 |
commit | 4e29ac9d031d623b9bdb74f45ac5c14f9f2eadbd (patch) | |
tree | 3bbbd7f40b543e14229a85e5e64b8c8f1bcc0c6d /bftw.h | |
parent | 3c04b862ff35e2c040adbdb4d17310bff1f8cb35 (diff) | |
download | bfs-4e29ac9d031d623b9bdb74f45ac5c14f9f2eadbd.tar.xz |
Add -depth support.
The resulting order is fairly weird, as files are still returned in
breadth-first order, but directories are returned in a backwards order
based on when their reference counts drop to zero. But it's good enough
for -delete support.
Diffstat (limited to 'bftw.h')
-rw-r--r-- | bftw.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -98,5 +98,7 @@ int bftw(const char *path, bftw_fn *fn, int nopenfd, int flags, void *ptr); #define BFTW_STAT (1 << 0) /** flag: Attempt to recover from encountered errors. */ #define BFTW_RECOVER (1 << 1) +/** flag: Visit all of a directory's descendants before the directory itself. */ +#define BFTW_DEPTH (1 << 2) #endif // BFS_BFTW_H |