Iterative, recursive file finder for Perl 6
Perl 6
Switch branches/tags
Nothing to show
Latest commit 19eedd3 Jun 26, 2017 @Leont Made tests more portable
Failed to load latest commit information.
lib/Path Use introspection for argument passing in finder Jan 24, 2016
.gitignore .gitignore precompilation Dec 3, 2015
.travis.yml Add Travis CI Configuration Oct 12, 2015 Add mandatory "perl" META field Oct 27, 2016 Add functional interface Dec 31, 2015

This is a module for iterating over directory trees, and filtering out entries of interest. It is inspired by Perl 5's Path::Iterator::Rule, in particular it tries to iterate as lazy as possible and offers a fluent interface. For example, to lazily perl 6 scripts, while skipping over versioning files in a certain set of directories one could do:

for Path::Iterator.skip-vcs.ext(rx/ 'pl' 6? $ /).shebang(rx/ ^ '#!' .* 'perl6' /).in(@dirs) -> $file {

It also offers a functional interface, like this:

for find(@dirs, :ext(rx/ 'pl' 6? $ /), :shebang(rx/ ^ '#!' .* 'perl6' /), :skip-vcs) -> $file {