RFR: 8292562: (fs) Use file cloning in Linux and macOS versions of Files::copy method [v9]
Alan Bateman
alanb at openjdk.org
Tue Aug 30 11:06:15 UTC 2022
On Tue, 30 Aug 2022 00:23:46 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Add file cloning to `java.nio.channels.FileChannel::transferTo` and `java.nio.file.Files.copy(Path,Path)`.
>
> Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits:
>
> - 8264744: Refactor UnixCopyFile::copyFile into UnixFileSystem; refactor OS-specific code to {Bsd,Linux}FileSystem
> - Merge
> - 8264744: Add mode to clone() and other requested changes
> - 8264744: Refactor {Bsd,Linux}CopyFile::clone into {Bsd,Linux}FileSystem::clone
> - Merge
> - 8264744: Remove CloneFile classes; refactor to use {Bsd,Linux}CopyFile
> - Merge
> - 8264744: Fix typo desintation -> destination
> - 8264744: Refactor into UnixCopyFile hierarchy
> - Merge
> - ... and 3 more: https://git.openjdk.org/jdk/compare/c74b6d45...ecce2093
I've skimmed through ecce2093. There is a lot of refactoring (which is good) and it also introduces the use of clone on macOS. What would you think about separating this two? Let's get the Linux and BSD/macOS separation out of the way and that would allow us to discuss the semantics issue and agree when it is safe to use clone.
-------------
PR: https://git.openjdk.org/jdk/pull/9486
More information about the nio-dev
mailing list