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, waitatomicMoveFileWithFallback, atomicMoveWithFallback, copyTo, copyTo, copyTo, moveFileTo, moveFileTo, moveFileTo, 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 java.nio.file.Path moveFileTo(java.io.File to,
boolean replace)
Files.TemporaryFileFile. 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.TemporaryFileto - 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.TemporaryFileFile. 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.TemporaryFileto - 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.TemporaryFilereplace parameter.copyTo in interface Files.TemporaryFiledestination - the path destination.replace - if it should replace an existing file.public java.nio.file.Path atomicMoveFileWithFallback(java.io.File to)
Files.TemporaryFileThis 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.TemporaryFileto - the path to the destination file@Deprecated public Files.TemporaryFile atomicMoveWithFallback(java.io.File to)
Files.TemporaryFileThis 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.TemporaryFileto - the path to the destination file