public static class Files.DelegateTemporaryFile extends java.lang.Object implements Files.TemporaryFile
Constructor and Description |
---|
DelegateTemporaryFile(play.api.libs.Files.TemporaryFile 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.
|
Files.TemporaryFile |
atomicMoveWithFallback(java.io.File to)
Deprecated.
|
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. |
java.nio.file.Path |
moveFileTo(java.io.File to,
boolean replace)
Move the file to the specified destination
File . |
Files.TemporaryFile |
moveTo(java.io.File to,
boolean replace)
Deprecated.
|
java.nio.file.Path |
path() |
Files.TemporaryFileCreator |
temporaryFileCreator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
atomicMoveFileWithFallback, atomicMoveWithFallback, copyTo, copyTo, copyTo, moveFileTo, moveFileTo, moveFileTo, moveTo, moveTo, moveTo
public DelegateTemporaryFile(play.api.libs.Files.TemporaryFile temporaryFile)
public java.nio.file.Path path()
path
in interface Files.TemporaryFile
public Files.TemporaryFileCreator temporaryFileCreator()
temporaryFileCreator
in interface Files.TemporaryFile
public java.nio.file.Path moveFileTo(java.io.File to, boolean replace)
Files.TemporaryFile
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.moveFileTo
in interface Files.TemporaryFile
to
- the path to the destination filereplace
- true if an existing file should be replaced, false otherwise.@Deprecated public Files.TemporaryFile moveTo(java.io.File to, boolean replace)
Files.TemporaryFile
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.moveTo
in interface Files.TemporaryFile
to
- the path to the destination filereplace
- true if an existing file should be replaced, false otherwise.public java.nio.file.Path copyTo(java.nio.file.Path destination, boolean replace)
Files.TemporaryFile
replace
parameter.copyTo
in interface Files.TemporaryFile
destination
- the path destination.replace
- if it should replace an existing file.public java.nio.file.Path atomicMoveFileWithFallback(java.io.File to)
Files.TemporaryFile
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.
atomicMoveFileWithFallback
in interface Files.TemporaryFile
to
- the path to the destination file@Deprecated public Files.TemporaryFile atomicMoveWithFallback(java.io.File to)
Files.TemporaryFile
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.
atomicMoveWithFallback
in interface Files.TemporaryFile
to
- the path to the destination file