This adds initial support for GNU find-compatible printf syntax. As far
as I can tell, it should implement all the specifiers, with the
following exceptions:
- Using zero as padding instead of space: GNU find isn't consistent with
which numeric format specifiers support this.
- Specifying precision (`%x.yz`): I believe sparseness (%S)
and seconds-since-epoch (`%A@` / `%C@` / `%T@`) are the only ones that
allow this, making it only partially useful.
- Printing SELinux contexts (`%Z`): requires some extra dependencies and
isn't within our scope.
uucore is added as a dependency, because it has several utility
functions that we need, the complexity of which is high enough that
using the extra dependency is quite helpful.
This also stubs out many of the specifiers for Windows, simply because I
have no idea how these should work there. (The defaults chosen should be
"good enough" for the moment, though.)
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
* Initial checkin. Supports -name, -name -print and a subset of -type
Has unit tests, but no system tests
* Corrected usage text
* Added ability to replace stdout with a fake. Moved and_matcher to
logical_matchers
* Significant refactoring to allow tests for the arg-parsing code
* Added tests for the argument parsing code.
* Added support for or operator
* Added change missing form last commit
* Added AUTHORS and (MIT) LICENSE
* Added support for lists (i.e. the comma operand)
* Added support for parentheses
* Cleaned up names of some Or/And/List matcher methods
* Added support for depth-first searching
* Added initial support for max_depth, min_depth and depth arguments.
* Cleaned up a surfeit of Box::new's and change the [Or|And|List]Matchers
to use builders, so submatchers can't be added later on.
* Added support for -a
* Added support for prune
* Added prune
* Refactored the way we fake stdoutput.
Will allowing for easy expansion for stderr, clocks etc.
* Renamed side effects to matcherio
* Removed leftover tracing println call
* Tidied up use statements
* Switched to using walkdir
* Added support for -newer
* renamed new_sideeffetcs to new_matcher_io
* Implemented ctime, atime and mtime
* merged name_matcher and caseless_name_matcher into one module
* Added support for -size
* Minor tweaks based on code review
* Switched Config struct to implement Default
* Replaced try! with ?
* Added copyright headers