Interface FileSystem.ForNio2CapableVm.Files
- Enclosing class:
FileSystem.ForNio2CapableVm
A dispatcher to access the
java.nio.file.Files API.-
Method Summary
Modifier and TypeMethodDescriptionCopies a file.createLink(Object source, Object target) Links a file.deleteIfExists(Object file) Deletes a file if it exists.Moves a file.
-
Method Details
-
copy
@IsStatic Object copy(@Proxied("java.nio.file.Path") Object source, @Proxied("java.nio.file.Path") Object target, @Proxied("java.nio.file.CopyOption") Object[] option) throws 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:
IOException- If an I/O exception occurs.
-
createLink
@IsStatic Object createLink(@Proxied("java.nio.file.Path") Object source, @Proxied("java.nio.file.Path") Object target) throws IOException Links a file.- Parameters:
source- The sourcejava.nio.file.Path.target- The targetjava.nio.file.Path.- Returns:
- The copied file.
- Throws:
IOException- If an I/O exception occurs.
-
move
@IsStatic Object move(@Proxied("java.nio.file.Path") Object source, @Proxied("java.nio.file.Path") Object target, @Proxied("java.nio.file.CopyOption") Object[] option) throws 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:
IOException- If an I/O exception occurs.
-
deleteIfExists
Deletes a file if it exists.- Parameters:
file- Thejava.nio.file.Pathto delete if it exists.- Returns:
- The supplied file.
- Throws:
IOException- If an I/O exception occurs.
-