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, wait
atomicMoveWithFallback, copyTo, copyTo, copyTo, 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 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
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.TemporaryFile
to
- 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.TemporaryFile
replace
parameter.copyTo
in interface Files.TemporaryFile
destination
- the path destination.replace
- if it should replace an existing file.public Files.TemporaryFile atomicMoveWithFallback(java.io.File to)
Files.TemporaryFile
atomicMoveWithFallback
in interface Files.TemporaryFile
to
- the path to the destination file