Skip to content

Conversation

@cto-new
Copy link

@cto-new cto-new bot commented Oct 15, 2025

Summary

This PR adds a new unified delete_file method to the Koha::File::Transport class and all its subclasses, enabling safe and consistent file deletion for all supported transport types.

Details

  • Introduced an abstract delete_file method to Koha::File::Transport.
  • Implemented concrete delete_file logic for SFTP, FTP, and Local transports, including robust error and success reporting.
  • Enhanced the polymorphic transport test suite to assert delete_file availability and correct deletion/file-system behavior for Local.
  • Ensures error handling and messaging are consistent across implementations for maintainability.

Warning: Task VM test is not passing, cto.new will perform much better if you fix the setup

… and subclasses

Introduce a new delete_file interface to all Koha::File::Transport
subclasses to support file deletion over all supported transport types.
This change is needed to provide a unified way to delete files on remote
or local storage within Koha's file transport abstraction.

- Add delete_file method to Koha::File::Transport as abstract interface
- Implement delete_file in Local, FTP, and SFTP subclasses
- Integrate robust error handling and success logging for deletions
- Expand tests to cover delete_file, including file system checks

This adds an important capability for automation and maintenance tasks
using Koha's file management framework.
@github-actions
Copy link

(Automated Close) Please do not file pull requests here, this repo is merely a clone of https://git.koha-community.org/Koha-community/Koha and we use Bugzilla at https://bugs.koha-community.org to submit patches to its codebase.\n\nSee https://wiki.koha-community.org/wiki/Submitting_A_Patch for more information. Note that you can use to easily set-up a full development environment, which includes the command to easily push your patches with a single command, instead of manually fiddling with patch files!\n\nIf you have any more questions or need help, do not hesitate to ask in our Mattermost chat: https://chat.koha-community.org. Thank you.

@github-actions github-actions bot closed this Oct 15, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant