https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41020

Martin Renvoize (ashimema) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #188146|0                           |1
        is obsolete|                            |

--- Comment #32 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 188153
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188153&action=edit
Bug 41020: Add delete_file() method to file transport classes

This patch adds the ability to delete files from remote servers
through the file transport API. This is needed for the MARC ordering
feature to clean up processed files from FTP/SFTP servers.

Changes:
- Added abstract delete_file() method to Koha::File::Transport base class
- Implemented delete_file() in Koha::File::Transport::FTP using
Net::FTP->delete()
- Implemented delete_file() in Koha::File::Transport::SFTP using
Net::SFTP::Foreign->remove()
- Implemented delete_file() in Koha::File::Transport::Local using unlink()
- All implementations follow the standard message/error handling pattern
- Updated polymorphic tests to verify delete_file() capability

The delete_file() method:
- Takes a filename as parameter (relative to current directory)
- Returns true on success, undef on failure
- Adds appropriate success/error messages to the transport message queue
- Follows the same pattern as existing methods (download_file, rename_file)

Test plan:
1. prove t/db_dependent/Koha/File/Transports.t
2. Verify all transport types support delete_file()
3. Test with MARC ordering cronjob using --dr flag (added in main patch)

Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to