Net::FTP::Path::Iter - Iterative, recursive, FTP file finder
version 0.04
use Net::FTP::Path::Iter; # connect to the FTP site my $ftp = Net::FTP::Path::Iter->new( $ftp_site, $user, $password ); # define a visitor callback routine. It will recieve a # Net::FTP::Path::Iter::Entry object. sub visitor { my ($entry) = @_ } # use the Path::Iterator::Rule all() method to traverse the # site; $ftp->all( '/', \&visitor );
Net::FTP::Path::Iter is a subclass of Path::Iterator::Rule which iterates over an FTP site rather than a local filesystem.
See the documentation Path::Iterator::Rule for how to filter and traverse paths. When Net::FTP::Path::Iter passes a path to a callback or returns one from an iterator, it will be in the form of a Net::FTP::Path::Iter::Entry object.
Net::FTP::Path::Iter uses Net::FTP to connect to the FTP site.
At present, Net::FTP::Path::Iter does not handle symbolic links. It will output an error and skip them.
$ftp = Net::FTP::Path::Iter->new( [$host], %options );
Open up a connection to an FTP host and log in. The arguments are the same as for "new" in Net::FTP, with the addition of two mandatory options,
user
The user name
password
The password
Net::FTP::Path::Iter subclasses Path::Iter::Rule. It is a hash based object and has the following additional attributes:
server
The Net::FTP object representing the connection to the FTP server.
You can make new bug reports, and view existing ones, through the web interface at https://rt.cpan.org/Public/Dist/Display.html?Name=Net-FTP-Path-Iter.
Diab Jerius <djerius@cpan.org>
This software is Copyright (c) 2017 by Smithsonian Astrophysical Observatory.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
To install Net::FTP::Path::Iter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::FTP::Path::Iter
CPAN shell
perl -MCPAN -e shell install Net::FTP::Path::Iter
For more information on module installation, please visit the detailed CPAN module installation guide.