Koha::File::Transport - Base class for file transport handling
Base class providing common functionality for FTP/SFTP file transport.
$server->store;
Overloaded store method that ensures directory paths end with a forward slash.
my $password = $server->plain_text_password;
Returns the decrypted plaintext password.
my $key = $server->plain_text_key;
Returns the decrypted plaintext key file.
my $json = $transport->to_api;
Returns a JSON representation of the object suitable for API output, excluding sensitive data.
This method returns the mapping for representing a Koha::File::Transport object on the API.
$transport->test_connection
Method to test the connection for the configuration of the current file server
Interface methods that must be implemented by subclasses
$transport->connect();
Method for connecting the current transport to the file server
$transport->upload_file($file);
Method for uploading a file to the current file server
$transport->download_file($file);
Method for downloading a file from the current file server
my $files = $transport->change_directory($path);
Method for changing the current directory on the connected file server
my $files = $transport->list_files($path);
Method for listing files in the current directory of the connected file server
my $success = $transport->rename_file($old_name, $new_name);
Method for renaming a file on the current file server
$transport->disconnect();
Method for disconnecting from the current file server
$server->_post_store_trigger;
Method triggered by parent store to allow local additions to the store call
Handle encryption of sensitive data
Return a CR-free string from an input
Return type of Object relating to Schema Result