RFR: 8264744: (fc, fs) Support file cloning in Unix versions of FileChannel transfer and Files copy methods

Alan Bateman alanb at openjdk.org
Thu Jul 14 17:42:02 UTC 2022


On Wed, 13 Jul 2022 23:25:00 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)`.

This is good work but it is putting a lot of platform specific code in UnixCopyFile. I think we'll need to some up front refactoring to support this so that the copy_file_range and clonefile implementation are Linux and macOS specific source files. This should allow more of the code to be written in Java and will allow most of the native code to go away.

-------------

PR: https://git.openjdk.org/jdk/pull/9486


More information about the nio-dev mailing list