public static interface Files.TemporaryFile
Modifier and Type | Method and Description |
---|---|
java.nio.file.Path |
atomicMoveFileWithFallback(java.io.File to)
Attempts to move source to target atomically and falls back to a non-atomic move if it fails.
|
default java.nio.file.Path |
atomicMoveFileWithFallback(java.nio.file.Path to)
Attempts to move source to target atomically and falls back to a non-atomic move if it fails.
|
Files.TemporaryFile |
atomicMoveWithFallback(java.io.File to)
Deprecated.
Deprecated as of 2.7.0. Use
atomicMoveFileWithFallback(File) instead. |
default Files.TemporaryFile |
atomicMoveWithFallback(java.nio.file.Path to)
Deprecated.
Deprecated as of 2.7.0. Use
atomicMoveFileWithFallback(Path) instead. |
default java.nio.file.Path |
copyTo(java.io.File destination)
Copy the temporary file to the specified destination.
|
default java.nio.file.Path |
copyTo(java.io.File destination,
boolean replace)
Copy the file to the specified destination and, if the destination exists, decide if replace
it based on the
replace parameter. |
default java.nio.file.Path |
copyTo(java.nio.file.Path destination)
Copy the file to the specified path destination.
|
java.nio.file.Path |
copyTo(java.nio.file.Path destination,
boolean replace)
Copy the file to the specified path destination and, if the destination exists, decide if
replace it based on the
replace parameter. |
default java.nio.file.Path |
moveFileTo(java.io.File destination)
Move the file using a
File . |
java.nio.file.Path |
moveFileTo(java.io.File destination,
boolean replace)
Move the file to the specified destination
File . |
default java.nio.file.Path |
moveFileTo(java.nio.file.Path to)
Move the file using a
Path . |
default java.nio.file.Path |
moveFileTo(java.nio.file.Path to,
boolean replace)
Move the file using a
Path . |
default Files.TemporaryFile |
moveTo(java.io.File destination)
Deprecated.
Deprecated as of 2.7.0. Use
moveFileTo(File) instead. |
Files.TemporaryFile |
moveTo(java.io.File destination,
boolean replace)
Deprecated.
Deprecated as of 2.7.0. Use
moveFileTo(File, boolean) instead. |
default Files.TemporaryFile |
moveTo(java.nio.file.Path to)
Deprecated.
Deprecated as of 2.7.0. Use
moveFileTo(Path) instead. |
default Files.TemporaryFile |
moveTo(java.nio.file.Path to,
boolean replace)
Deprecated.
Deprecated as of 2.7.0. Use
moveFileTo(Path, boolean) instead. |
java.nio.file.Path |
path() |
Files.TemporaryFileCreator |
temporaryFileCreator() |
java.nio.file.Path path()
Files.TemporaryFileCreator temporaryFileCreator()
default java.nio.file.Path copyTo(java.io.File destination)
destination
- the file destination.copyTo(Path, boolean)
default java.nio.file.Path copyTo(java.io.File destination, boolean replace)
replace
parameter.destination
- the file destination.replace
- if it should replace an existing file.copyTo(Path, boolean)
default java.nio.file.Path copyTo(java.nio.file.Path destination)
destination
- the path destination.copyTo(Path, boolean)
java.nio.file.Path copyTo(java.nio.file.Path destination, boolean replace)
replace
parameter.destination
- the path destination.replace
- if it should replace an existing file.default java.nio.file.Path moveFileTo(java.io.File destination)
File
.destination
- the path to the destination filemoveFileTo(Path, boolean)
java.nio.file.Path moveFileTo(java.io.File destination, boolean replace)
File
. In some cases, the source
and destination file may point to the same inode
. See the documentation for Files.move(Path, Path, CopyOption...)
to see more details.destination
- the path to the destination filereplace
- true if an existing file should be replaced, false otherwise.default java.nio.file.Path moveFileTo(java.nio.file.Path to)
Path
.to
- the path to the destination file.moveFileTo(Path, boolean)
default java.nio.file.Path moveFileTo(java.nio.file.Path to, boolean replace)
Path
.to
- the path to the destination filereplace
- true if an existing file should be replaced, false otherwise.moveFileTo(Path, boolean)
@Deprecated default Files.TemporaryFile moveTo(java.io.File destination)
moveFileTo(File)
instead.File
.destination
- the path to the destination filemoveTo(Path, boolean)
@Deprecated Files.TemporaryFile moveTo(java.io.File destination, boolean replace)
moveFileTo(File, boolean)
instead.File
. In some cases, the source
and destination file may point to the same inode
. See the documentation for Files.move(Path, Path, CopyOption...)
to see more details.destination
- the path to the destination filereplace
- true if an existing file should be replaced, false otherwise.@Deprecated default Files.TemporaryFile moveTo(java.nio.file.Path to)
moveFileTo(Path)
instead.Path
.to
- the path to the destination file.moveTo(Path, boolean)
@Deprecated default Files.TemporaryFile moveTo(java.nio.file.Path to, boolean replace)
moveFileTo(Path, boolean)
instead.Path
.to
- the path to the destination filereplace
- true if an existing file should be replaced, false otherwise.moveTo(Path, boolean)
java.nio.file.Path atomicMoveFileWithFallback(java.io.File to)
This always tries to replace existent files. Since it is platform dependent if atomic moves replaces existent files or not, considering that it will always replaces, makes the API more predictable.
to
- the path to the destination filedefault java.nio.file.Path atomicMoveFileWithFallback(java.nio.file.Path to)
This always tries to replace existent files. Since it is platform dependent if atomic moves replaces existent files or not, considering that it will always replaces, makes the API more predictable.
to
- the path to the destination file@Deprecated Files.TemporaryFile atomicMoveWithFallback(java.io.File to)
atomicMoveFileWithFallback(File)
instead.This always tries to replace existent files. Since it is platform dependent if atomic moves replaces existent files or not, considering that it will always replaces, makes the API more predictable.
to
- the path to the destination file@Deprecated default Files.TemporaryFile atomicMoveWithFallback(java.nio.file.Path to)
atomicMoveFileWithFallback(Path)
instead.This always tries to replace existent files. Since it is platform dependent if atomic moves replaces existent files or not, considering that it will always replaces, makes the API more predictable.
to
- the path to the destination file