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 |
|---|---|
Files.TemporaryFile |
atomicMoveWithFallback(java.io.File to)
Attempts to move source to target atomically and falls back to a non-atomic move if it fails.
|
Files.TemporaryFile |
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. |
Files.TemporaryFile |
moveTo(java.io.File to,
boolean replace)
Move the file to the specified destination
File. |
java.nio.file.Path |
path() |
Files.TemporaryFileCreator |
temporaryFileCreator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitatomicMoveWithFallback, copyTo, copyTo, copyTo, moveTo, moveTo, moveTopublic DelegateTemporaryFile(play.api.libs.Files.TemporaryFile temporaryFile)
public java.nio.file.Path path()
path in interface Files.TemporaryFilepublic Files.TemporaryFileCreator temporaryFileCreator()
temporaryFileCreator in interface Files.TemporaryFilepublic Files.TemporaryFile moveTo(java.io.File to, boolean replace)
Files.TemporaryFileFile. In some cases, the source and destination file
may point to the same inode meaning that deleting the source will result in the destination being deleted
too. See the documentation for Files.move(Path, Path, CopyOption...) to see more details.
This behavior is especially relevant if you are also using the Files.TemporaryFileReaper
which deletes temporary files.moveTo in interface Files.TemporaryFileto - the path to the destination filereplace - true if an existing file should be replaced, false otherwise.public Files.TemporaryFile copyTo(java.nio.file.Path destination, boolean replace)
Files.TemporaryFilereplace parameter.copyTo in interface Files.TemporaryFiledestination - the path destination.replace - if it should replace an existing file.public Files.TemporaryFile atomicMoveWithFallback(java.io.File to)
Files.TemporaryFileatomicMoveWithFallback in interface Files.TemporaryFileto - the path to the destination file