File::Find::Fast
A module to find files much more quickly than `File::Find`. The trick is that it doesn't `stat` any files.
use strict;
use warnings;
use Data::Dumper qw/Dumper/;
use File::Find::Fast qw/find/;
my $files = find("some/directory");
print Dumper $files
I purely made this module because I wanted a fast way to list files without running stat. By using this module, you do not get file information directly. You would have to use `stat` or similar methods as a follow up.
- find($dir)
-
Finds all files in a directory, recursively.
my $files = find("t/files"); print join("\n", @$files); print "\n";
- find_iterator
-
An iterator for finding files. Breadth first. This is useful if you don't want to load all the files into memory first.
$it = find_iterator("t/files"); while(my $f=$it->()){ next if($f =~ /2/); # skip any file that has a 2 in it print $f."\n"; }