Skip to content

chore: move streamCopy implementation from OC_Helper to OCP\Files - #52890

Merged
susnux merged 2 commits into
masterfrom
chore/move-stream-copy-implementation
May 17, 2025
Merged

chore: move streamCopy implementation from OC_Helper to OCP\Files#52890
susnux merged 2 commits into
masterfrom
chore/move-stream-copy-implementation

Conversation

@susnux

@susnuxsusnux commented May 15, 2025

Copy link
Copy Markdown
Contributor

Summary

The function was already there but called the legacy version. So moved the implementation and migrated all usages of it. Sadly the interface was slightly different so adjusted it to be compatible with both legacy and the OCP one.

Checklist

@susnux
susnux requested a review from a team as a code ownerMay 15, 2025 22:09
@susnux
susnux requested review from icewind1991, nfebe and yemkareems and removed request for a teamMay 15, 2025 22:09
@susnuxsusnux added 3. to review Waiting for reviews ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels May 15, 2025
@susnuxsusnux added this to the Nextcloud 32 milestone May 15, 2025
Comment threadlib/public/Files.php
The function was already there but called the legacy version.
So moved the implementation and migrated all usages of it.
Sadly the interface was slightly different so adjusted it to be
compatible with both legacy and the OCP one.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnuxforce-pushed the chore/move-stream-copy-implementation branch from 6df30fb to 585597fCompareMay 16, 2025 11:03
@susnux
susnux requested a review from provokateurinMay 16, 2025 11:03
@susnux

Copy link
Copy Markdown
ContributorAuthor

@icewind1991 as we discussed completely removing streamCopy I checked the code again and we cannot do this as the use cases that still exist are all about fallbacks if the storage does not implement IWriteStreamStorage.

The only way to solve this I see is:

  • Either add streamCopy somewhere undeprecated
  • Make IWriteStreamStorage mandatory for all storages.

…`streamCopy` if possible
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnuxforce-pushed the chore/move-stream-copy-implementation branch from 585597f to 0f69648CompareMay 16, 2025 15:28
@susnux
susnux merged commit e2a331f into masterMay 17, 2025
@susnux
susnux deleted the chore/move-stream-copy-implementation branch May 17, 2025 10:01
@skjnldsvskjnldsv mentioned this pull request Aug 19, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews♻️ refactorRefactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@susnux@provokateurin@come-nc@skjnldsv