Package net.bytebuddy.utility
Class FileSystem.ForNio2CapableVm
- java.lang.Object
-
- net.bytebuddy.utility.FileSystem
-
- net.bytebuddy.utility.FileSystem.ForNio2CapableVm
-
- Enclosing class:
- FileSystem
@Enhance protected static class FileSystem.ForNio2CapableVm extends FileSystem
A file system representation for a VM that does support NIO2.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceFileSystem.ForNio2CapableVm.DispatcherA dispatcher to resolve aFileto ajava.nio.file.Path.protected static interfaceFileSystem.ForNio2CapableVm.FilesA dispatcher to access thejava.nio.file.FilesAPI.protected static interfaceFileSystem.ForNio2CapableVm.StandardCopyOptionA dispatcher to interact withjava.nio.file.StandardCopyOption.-
Nested classes/interfaces inherited from class net.bytebuddy.utility.FileSystem
FileSystem.ForLegacyVm, FileSystem.ForNio2CapableVm
-
-
Field Summary
Fields Modifier and Type Field Description private static FileSystem.ForNio2CapableVm.DispatcherDISPATCHERA dispatcher to resolve aFileto ajava.nio.file.Path.private static FileSystem.ForNio2CapableVm.FilesFILESA dispatcher to resolve a dispatcher forjava.nio.file.Files.private static FileSystem.ForNio2CapableVm.StandardCopyOptionSTANDARD_COPY_OPTIONA dispatcher to interact withjava.nio.file.StandardCopyOption.
-
Constructor Summary
Constructors Modifier Constructor Description protectedForNio2CapableVm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopy(java.io.File source, java.io.File target)Copies a file.voidlink(java.io.File source, java.io.File target)Links a file as a hard-link.voidmove(java.io.File source, java.io.File target)Moves a file.-
Methods inherited from class net.bytebuddy.utility.FileSystem
getInstance
-
-
-
-
Field Detail
-
DISPATCHER
private static final FileSystem.ForNio2CapableVm.Dispatcher DISPATCHER
A dispatcher to resolve aFileto ajava.nio.file.Path.
-
FILES
private static final FileSystem.ForNio2CapableVm.Files FILES
A dispatcher to resolve a dispatcher forjava.nio.file.Files.
-
STANDARD_COPY_OPTION
private static final FileSystem.ForNio2CapableVm.StandardCopyOption STANDARD_COPY_OPTION
A dispatcher to interact withjava.nio.file.StandardCopyOption.
-
-
Method Detail
-
copy
public void copy(java.io.File source, java.io.File target) throws java.io.IOExceptionDescription copied from class:FileSystemCopies a file.- Specified by:
copyin classFileSystem- Parameters:
source- The source file.target- The target file.- Throws:
java.io.IOException- If an I/O exception occurs.
-
link
public void link(java.io.File source, java.io.File target) throws java.io.IOExceptionDescription copied from class:FileSystemLinks a file as a hard-link. If linking is not supported, a copy is made.- Overrides:
linkin classFileSystem- Parameters:
source- The source file.target- The target file.- Throws:
java.io.IOException- If an I/O exception occurs.
-
move
public void move(java.io.File source, java.io.File target) throws java.io.IOExceptionDescription copied from class:FileSystemMoves a file.- Specified by:
movein classFileSystem- Parameters:
source- The source file.target- The target file.- Throws:
java.io.IOException- If an I/O exception occurs.
-
-