<<

NAME

Koha::File::Transport::Local - Local file system implementation of file transport

Class methods

connect

    my $success = $self->connect;

Validates that the configured directories exist and have appropriate permissions.

upload_file

    my $success =  $transport->upload_file($local_file, $remote_file);

Copies a local file to the upload directory.

Returns true on success or undefined on failure.

download_file

    my $success =  $transport->download_file($remote_file, $local_file);

Copies a file from the download directory to a local file.

Returns true on success or undefined on failure.

change_directory

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

Sets the current working directory for file operations.

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. Each hashref contains: filename, longname, size, perms, mtime.

rename_file

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

Renames a file in the current directory.

Returns true on success or undefined on failure.

disconnect

    $server->disconnect();

For local transport, this is a no-op as there are no connections to close.

<<