summaryrefslogtreecommitdiffstats
path: root/bftw.c
Commit message (Collapse)AuthorAgeFilesLines
* Implement -mount/-xdev.Tavian Barnes2016-02-141-2/+11
|
* Fix -name handling when the root has trailing slashes.Tavian Barnes2016-02-131-2/+18
|
* Follow links if appropriate in predicates.Tavian Barnes2016-02-131-5/+3
|
* Implement -L/-follow.Tavian Barnes2016-02-091-22/+66
|
* bftw: Don't give up when following a broken symlink.Tavian Barnes2016-02-061-1/+9
|
* Implement -P and -H.Tavian Barnes2016-02-041-4/+14
|
* Don't use typedefs to avoid struct/enum tags.Tavian Barnes2016-02-041-66/+62
|
* bftw: Add missing #include.Tavian Barnes2016-01-301-0/+1
|
* bftw: Fix fd leak if fdopendir() fails.Tavian Barnes2016-01-301-1/+5
|
* Optimize -maxdepth in -depth mode.Tavian Barnes2015-09-261-14/+1
|
* bftw() interface improvements:Tavian Barnes2015-09-261-52/+38
| | | | | | - Use enums instead of ints where it makes sense - Move the file path inside struct BFTW - Expose a fd and relative path for *at() calls
* Add -depth support.Tavian Barnes2015-09-081-41/+186
| | | | | | | 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.
* Factor some code out of bftw().Tavian Barnes2015-09-061-77/+172
|
* Print the root file/directory too.Tavian Barnes2015-09-021-84/+130
|
* bftw: Store the paths with a trailing slash.Tavian Barnes2015-08-311-32/+37
|
* bftw: Fix path size of /.Tavian Barnes2015-08-311-2/+6
|
* Add -type support.Tavian Barnes2015-08-301-9/+33
| | | | Fixes #2.
* Infer the right value for nopenfd, and recover from EMFILE.Tavian Barnes2015-07-271-1/+13
|
* Recover from errors in diropen().Tavian Barnes2015-07-251-78/+122
| | | | Fixes #4.
* bftw: New struct BFTW type to hold file attributes.Tavian Barnes2015-07-231-22/+27
| | | | | Like nftw()'s struct FTW. level is needed to implement -mindepth/ -maxdepth.
* bftw: Assume struct dirent::d_type exists if DT_* are defined.Tavian Barnes2015-07-191-1/+1
| | | | | | | Only glibc defines _DIRENT_HAVE_D_TYPE, but other C libraries have d_type too. This should fix #3.
* Assorted optimizations.Tavian Barnes2015-06-231-18/+25
|
* bftw: Don't add extra slashes.Tavian Barnes2015-06-211-4/+20
| | | | This fixes "bfs /" among other things.
* bftw: Add flags parameter and BFTW_STAT flag.Tavian Barnes2015-06-181-4/+8
|
* Implement bftw().Tavian Barnes2015-06-141-0/+491