Net::xFTP

Net::xFTP is a Perl module with common wrapper functions for use with either Net::FTP or Net::xFTP.
Download

Net::xFTP Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jim Turner
  • Publisher web site:
  • http://search.cpan.org/~jlishev/WebTools-1.27/lib/modules/WTJSprite.pm

Net::xFTP Tags


Net::xFTP Description

Net::xFTP is a Perl module with common wrapper functions for use with either Net::FTP or Net::xFTP. Net::xFTP is a Perl module with common wrapper functions for use with either Net::FTP or Net::xFTP.SYNOPSIS use Net::xFTP; #Test for needed protocol module. die "..This server connection needs Net::SFTP!" unless (Net::xFTP->haveSFTP()); #Establish a new connection to a remote host. $ftp = Net::xFTP->new('SFTP', "some.host.name", Debug => 0, user => 'userid', password => 'opensesme') or die "Cannot connect to some.host.name: $@"; #Establish a "local" (simulated connection) to self. $ftp = Net::xFTP->new(); #Change the current working directory on the remote host. $ftp->cwd('/pub') or die "Cannot change working directory ", $ftp->message(); #Get the current working directory on the remote host. my $current_remote_path = $ftp->pwd(); #Get a list of files and subdirectories in "/pub". my @filesAndSubfolders = $ftp->ls('/pub'); #Get a detailed (ls -l) list of files and subdirectories. my @ls_l_details = $ftp->dir('/pub'); #Create a new subdirectory. $ftp->mkdir('myownfolder') or die "Cannot make subdirectory ", $ftp->message(); #Remove an empty subdirectory. $ftp->rmdir('myownfolder') or die "Cannot remove subdirectory ", $ftp->message(); #Get the contents of a file on the remote server. $ftp->get('remote.file', 'local.file') or die "get failed ", $ftp->message(); #Get the contents of a remote file and write to an open filehandle. open FHANDLE, ">local.file" or die "Could not open local file ($!)"; print FHANDLE "A Header Line!n"; flush FHANDLE; $ftp->get('remote.file', *FHANDLE) or die "get failed ", $ftp->message(); print FHANDLE "A Footer Line!n"; close FHANDLE; #Put a local file onto the remote server. $ftp->put('local.file', 'remote.file') or die "put failed ", $ftp->message(); #Read from a file handle putting the content in a remote file. open FHANDLE " Requirements: · Perl


Net::xFTP Related Software