App-Followme
view release on metacpan or search on metacpan
lib/App/Followme/UploadFtp.pm view on Meta::CPAN
my @path = splitdir($remote_filename);
$remote_filename = $self->{remote}->catfile(@path);
return $remote_filename;
}
1;
__END__
=encoding utf-8
=head1 NAME
App::Followme::UploadFtp - Upload files using ftp
=head1 SYNOPSIS
my $ftp = App::Followme::UploadNone->new(\%configuration);
$ftp->open($user, $password);
$ftp->add_directory($dir);
$ftp->add_file($local_filename, $remote_filename);
$ftp->delete_file($filename);
$ftp->delete_dir($dir);
$ftp->close();
=head1 DESCRIPTION
L<App::Followme::UploadSite> splits off methods that do the actual uploading
into a separate package, so it can support more than one method. This package
uploads files using good old ftp.
=head1 METHODS
The following are the public methods of the interface
=over 4
=item $flag = $self->add_directory($dir);
Create a new directory.
=item $flag = $self->add_file($local_filename, $remote_filename);
Upload a file.
=item $flag = $self->delete_directory($dir);
Delete a directory, including its contents
=item $flag = $self->delete_file($filename);
Delete a file on the remote site. .
=item $self->close();
Close the ftp connection to the remote site.
=back
=head1 CONFIGURATION
The follow parameters are used from the configuration. In addition, the package
will prompt for and save the user name and password.
=over 4
=item ftp_debug
Set to one to trace the ftp commands issued. Useful to diagnose problems
with ftp uploads. The default value is zero.
=item remote_directory
The top directory of the remote site
=item ftp_url
The url of the remote ftp site.
=item remote_pkg
The name of the package that manipulates filenames for the remote system. The
default value is 'File::Spec::Unix'. Other possible values are
'File::Spec::Win32' and 'File::Spec::VMS'. Consult the Perl documentation for
more information.
=back
=head1 LICENSE
Copyright (C) Bernie Simon.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=head1 AUTHOR
Bernie Simon E<lt>bernie.simon@gmail.comE<gt>
=cut
( run in 0.565 second using v1.01-cache-2.11-cpan-6aa56a78535 )