P
Peter Ensch
It's been a while since I used File::Find and I was under the impression
that it now supported traversal of symbolically linked directories; the
POD indicates that this is the case in the following warning:
"Be aware that the option to follow symbolic links can be dangerous.
Depending on the structure of the directory tree (including symbolic links
to directories) you..."
I cannot seem to make F::F follow links to directories however. Using
find2perl to generate an example script from this find command:
find2perl /an/example/dir/tree -follow -print
I get this (comments, shebang Etc. removed):
###########
use File::Find ();
use vars qw/*name *dir *prune/;
*name = *File::Find::name;
*dir = *File::Find::dir;
*prune = *File::Find:
rune;
sub wanted;
File::Find::find( {wanted => \&wanted, follow => 1},
'/an/example/dir/tree');
exit;
sub wanted {
print("$name\n");
}
###########
Why doesn't this follow symbolically linked directories like the
unix find command used to create it does?
Thanks,
Peter
--
^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
Peter Ensch,
(e-mail address removed) A-1140 (214) 480 2333
^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
that it now supported traversal of symbolically linked directories; the
POD indicates that this is the case in the following warning:
"Be aware that the option to follow symbolic links can be dangerous.
Depending on the structure of the directory tree (including symbolic links
to directories) you..."
I cannot seem to make F::F follow links to directories however. Using
find2perl to generate an example script from this find command:
find2perl /an/example/dir/tree -follow -print
I get this (comments, shebang Etc. removed):
###########
use File::Find ();
use vars qw/*name *dir *prune/;
*name = *File::Find::name;
*dir = *File::Find::dir;
*prune = *File::Find:
sub wanted;
File::Find::find( {wanted => \&wanted, follow => 1},
'/an/example/dir/tree');
exit;
sub wanted {
print("$name\n");
}
###########
Why doesn't this follow symbolically linked directories like the
unix find command used to create it does?
Thanks,
Peter
--
^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
Peter Ensch,
(e-mail address removed) A-1140 (214) 480 2333
^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^