in reply to File:find tutorial/introduction
I think to get "(a reference to) a hash that can describe the file", you have to look at Path::Class->stat, which uses File::stat. Otherwise, have a look at the plain stat call to find information about a file. Path::Class also has Path::Class::Iterator, which tries to be like File::Find. The basic skeleton for File::Find which I use is:
use File::Find; my @found; find(sub { push @found, $File::Find::name; }, @directories); ...
This has the disadvantage of first collecting all files instead of processing them as they become available, but it has the advantage of a very simple callback.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File:find tutorial/introduction
by ikegami (Patriarch) on Apr 12, 2010 at 19:49 UTC |