Package net.bytebuddy.utility
Interface FileSystem.ForNio2CapableVm.Files
-
- Enclosing class:
- FileSystem.ForNio2CapableVm
@Proxied("java.nio.file.Files") protected static interface FileSystem.ForNio2CapableVm.Files
A dispatcher to access thejava.nio.file.Files
API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
copy(java.lang.Object source, java.lang.Object target, java.lang.Object[] option)
Copies a file.java.lang.Object
createLink(java.lang.Object source, java.lang.Object target)
Links a file.java.lang.Object
deleteIfExists(java.lang.Object file)
Deletes a file if it exists.java.lang.Object
move(java.lang.Object source, java.lang.Object target, java.lang.Object[] option)
Moves a file.
-
-
-
Method Detail
-
copy
@IsStatic java.lang.Object copy(@Proxied("java.nio.file.Path") java.lang.Object source, @Proxied("java.nio.file.Path") java.lang.Object target, @Proxied("java.nio.file.CopyOption") java.lang.Object[] option) throws java.io.IOException
Copies a file.- Parameters:
source
- The sourcejava.nio.file.Path
.target
- The targetjava.nio.file.Path
.option
- An array of copy options.- Returns:
- The copied file.
- Throws:
java.io.IOException
- If an I/O exception occurs.
-
createLink
@IsStatic java.lang.Object createLink(@Proxied("java.nio.file.Path") java.lang.Object source, @Proxied("java.nio.file.Path") java.lang.Object target) throws java.io.IOException
Links a file.- Parameters:
source
- The sourcejava.nio.file.Path
.target
- The targetjava.nio.file.Path
.- Returns:
- The copied file.
- Throws:
java.io.IOException
- If an I/O exception occurs.
-
move
@IsStatic java.lang.Object move(@Proxied("java.nio.file.Path") java.lang.Object source, @Proxied("java.nio.file.Path") java.lang.Object target, @Proxied("java.nio.file.CopyOption") java.lang.Object[] option) throws java.io.IOException
Moves a file.- Parameters:
source
- The sourcejava.nio.file.Path
.target
- The targetjava.nio.file.Path
.option
- An array of copy options.- Returns:
- The moved file.
- Throws:
java.io.IOException
- If an I/O exception occurs.
-
deleteIfExists
@IsStatic java.lang.Object deleteIfExists(@Proxied("java.nio.file.Path") java.lang.Object file) throws java.io.IOException
Deletes a file if it exists.- Parameters:
file
- Thejava.nio.file.Path
to delete if it exists.- Returns:
- The supplied file.
- Throws:
java.io.IOException
- If an I/O exception occurs.
-
-