<<

NAME

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

Class methods

_connect

    my $success = $self->_connect;

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

_upload_file

Internal method that performs the SFTP-specific upload operation.

Returns true on success or undefined on failure.

_download_file

Internal method that performs the SFTP-specific download operation.

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

Internal method that performs the SFTP-specific file listing operation. Returns an array reference of hashrefs with file information. Each hashref contains: filename, longname, a (attributes).

_rename_file

Internal method that performs the SFTP-specific file rename operation.

Returns true on success or undefined on failure.

_is_connected

Internal method to check if transport is currently connected.

_disconnect

    $server->_disconnect();

Disconnects from the SFTP server.

Internal methods

_post_store_trigger

    $server->post_store_trigger;

Local trigger run by the parent store method after storage. Ensures key_file also gets written to the filesystem.

_write_key_file

    my $success = $server->_write_key_file;

Writes the keyfile from the db into a file.

Returns 1 on success, undef on failure.

_locate_key_file

    my $path = $server->_locate_key_file;

Returns the keyfile's path if it exists, undef otherwise.

_abort_operation

Helper method to abort the current operation and return.

DESTROY

Ensure proper cleanup of open filehandles

<<