<<

NAME

Koha::File::Transport - Base class for file transport handling

DESCRIPTION

Base class providing common functionality for FTP/SFTP file transport.

API

Class methods

store

    $server->store;

Overloaded store method that ensures directory paths end with a forward slash.

plain_text_password

    my $password = $server->plain_text_password;

Returns the decrypted plaintext password.

plain_text_key

    my $key = $server->plain_text_key;

Returns the decrypted plaintext key file.

to_api

    my $json = $transport->to_api;

Returns a JSON representation of the object suitable for API output, excluding sensitive data.

to_api_mapping

This method returns the mapping for representing a Koha::File::Transport object on the API.

test_connection

    $transport->test_connection

Method to test the connection for the configuration of the current file server

Subclass methods

Interface methods that must be implemented by subclasses

connect

    $transport->connect();

Method for connecting the current transport to the file server

upload_file

    $transport->upload_file($file);

Method for uploading a file to the current file server

download_file

    $transport->download_file($file);

Method for downloading a file from the current file server

change_directory

    my $files = $transport->change_directory($path);

Method for changing the current directory on the connected file server

list_files

    my $files = $transport->list_files($path);

Method for listing files in the current directory of the connected file server

rename_file

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

Method for renaming a file on the current file server

disconnect

    $transport->disconnect();

Method for disconnecting from the current file server

_post_store_trigger

    $server->_post_store_trigger;

Method triggered by parent store to allow local additions to the store call

Internal methods

_encrypt_sensitive_data

Handle encryption of sensitive data

_dos2unix

Return a CR-free string from an input

_type

Return type of Object relating to Schema Result

<<