NAME
App::Followme::UploadFtp - Upload files using ftp
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();
DESCRIPTION
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.
METHODS
The following are the public methods of the interface
- $flag = $self->add_directory($dir);
-
Create a new directory.
- $flag = $self->add_file($local_filename, $remote_filename);
-
Upload a file.
- $flag = $self->delete_directory($dir);
-
Delete a directory, including its contents
- $flag = $self->delete_file($filename);
-
Delete a file on the remote site. .
- $self->close();
-
Close the ftp connection to the remote site.
CONFIGURATION
The follow parameters are used from the configuration. In addition, the package will prompt for and save the user name and password.
- ftp_debug
-
Set to one to trace the ftp commands issued. Useful to diagnose problems with ftp uploads. The default value is zero.
- remote_directory
-
The top directory of the remote site
- ftp_url
-
The url of the remote ftp site.
- 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.
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.
AUTHOR
Bernie Simon <bernie.simon@gmail.com>