pyinfra icon indicating copy to clipboard operation
pyinfra copied to clipboard

Add files.copy operation

Open EricDriussi opened this issue 4 months ago • 1 comments

Adds copy operation suggested in #1121. Any and all feedback is welcome!

  • [x] Pull request is based on the default branch (3.x at this time)
  • [x] Pull request includes tests for any new/updated operations/facts
  • [x] Pull request includes documentation for any new/updated operations/facts
  • [x] Tests pass (see scripts/dev-test.sh)
  • [x] Type checking & code style passes (see scripts/dev-lint.sh)

EricDriussi avatar Sep 06 '25 16:09 EricDriussi

Hey! Sorry it took me forever to get back to this... I implemented the changes mentioned here, added/fixed tests and skipped the Windows CI (simply due to me not having a Windows machine to ensure the tests work before pushing).

Also, in the new _remote_file_equals function, I followed the same fallback logic I saw in _file_equals regarding the checksum comparison. I'm not quite sure if this is correct so please let me know if there's anything that needs to be updated before merging.

EricDriussi avatar Dec 08 '25 11:12 EricDriussi