mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8264744: (fs) Use file cloning in Linux version of Files::copy method
Reviewed-by: alanb
This commit is contained in:
parent
85d4b49151
commit
da596182a4
4 changed files with 76 additions and 16 deletions
|
@ -161,6 +161,8 @@ class LinuxFileSystem extends UnixFileSystem {
|
|||
|
||||
// -- native methods --
|
||||
|
||||
private static native void init();
|
||||
|
||||
/**
|
||||
* Copies data between file descriptors {@code src} and {@code dst} using
|
||||
* a platform-specific function or system call possibly having kernel
|
||||
|
@ -179,4 +181,9 @@ class LinuxFileSystem extends UnixFileSystem {
|
|||
private static native int directCopy0(int dst, int src,
|
||||
long addressToPollForCancel)
|
||||
throws UnixException;
|
||||
|
||||
static {
|
||||
jdk.internal.loader.BootLoader.loadLibrary("nio");
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue