<<

NAME

Koha::File::Transport::FTP - FTP implementation of file transport

Class methods

connect

    my $success = $self->connect;

Start the FTP transport connect, returns true on success or undefined on failure.

upload_file

    my $success =  $transport->upload_file($fh);

Passed a filehandle, this will upload the file to the current directory of the server connection.

Returns true on success or undefined on failure.

download_file

    my $success =  $transport->download_file($filename);

Passed a filename, this will download the file from the current directory of the server connection.

Returns true on success or undefined on failure.

change_directory

    my $success = $server->change_directory($directory);

Passed a directory name, this will change the current directory of the server connection.

Returns true on success or undefined on failure.

list_files

    my $files = $server->list_files;

Returns an array reference of hashrefs with file information found in the current directory of the server connection. Each hashref contains: filename, longname, size, perms.

rename_file

    my $success = $server->rename_file($old_name, $new_name);

Renames a file on the server connection.

Returns true on success or undefined on failure.

disconnect

    $server->disconnect();

Disconnects from the FTP server.

DESTROY

Ensure proper cleanup of FTP connections

<<