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
|
@ -71,6 +71,13 @@ class BsdFileSystem extends UnixFileSystem {
|
|||
return SupportedFileFileAttributeViewsHolder.supportedFileAttributeViews;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int directCopy(int dst, int src, long addressToPollForCancel)
|
||||
throws UnixException
|
||||
{
|
||||
return directCopy0(dst, src, addressToPollForCancel);
|
||||
}
|
||||
|
||||
@Override
|
||||
void copyNonPosixAttributes(int ofd, int nfd) {
|
||||
UnixUserDefinedFileAttributeView.copyExtendedAttributes(ofd, nfd);
|
||||
|
@ -102,22 +109,11 @@ class BsdFileSystem extends UnixFileSystem {
|
|||
return entries;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
FileStore getFileStore(UnixMountEntry entry) throws IOException {
|
||||
return new BsdFileStore(this, entry);
|
||||
}
|
||||
|
||||
// --- file copying ---
|
||||
|
||||
@Override
|
||||
int directCopy(int dst, int src, long addressToPollForCancel)
|
||||
throws UnixException
|
||||
{
|
||||
return directCopy0(dst, src, addressToPollForCancel);
|
||||
}
|
||||
|
||||
// -- native methods --
|
||||
|
||||
private static native int directCopy0(int dst, int src,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue