☺唐鳳☻
and 1 contributors

NAME

File::Find - Traverse a directory tree

SYNOPSIS

    use File::Find;

    my $f = File::Find.new;
    $f.wanted_file = sub ( $file, $path, $pathfile ) {
        return 1 if $file ~~ m:P5/^.*\.pm$/;
    }
    $f.dirs = qw/lib/;
    my @files = $f.find;

    # debug attribute for statistics
    $f.debug = 1;

DESCRIPTION

Perl 6 port of the File::Find library.

This is no direct port, the api got cleaned up a bit. :) Some features are still missing but will be added in the future...

CALLBACKS

We have two callbacks wanted_file and wanted_dir.

wanted_file

Gets called before a file is added to results. Should return 1 or 0. (defaults to 1)

    sub ( $file, $path, $pathfile ) {
        return 1;
    }
wanted_dir

Gets called before a directory is added to the queue. Should return 1 or 0. (defaults to 1)

    sub ( $dir, $path, $pathdir ) {
        return 1;
    }

AUTHOR

Sebastian Riedel <sri@oook.de>

LICENSE

This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.