public static class Files.DelegateTemporaryFile extends Object implements Files.TemporaryFile
Constructor and Description |
---|
DelegateTemporaryFile(play.api.libs.Files.TemporaryFile temporaryFile) |
Modifier and Type | Method and Description |
---|---|
Path |
atomicMoveFileWithFallback(File to)
Deprecated.
|
Path |
atomicMoveWithFallback(File to)
Attempts to move source to target atomically and falls back to a non-atomic move if it fails.
|
Path |
copyTo(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. |
Path |
moveFileTo(File to,
boolean replace)
Deprecated.
|
Path |
moveTo(File to,
boolean replace)
Move the file to the specified destination
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 Path path()
path
in interface Files.TemporaryFile
public Files.TemporaryFileCreator temporaryFileCreator()
temporaryFileCreator
in interface Files.TemporaryFile
@Deprecated public Path moveFileTo(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.public Path moveTo(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 Path copyTo(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.@Deprecated public Path atomicMoveFileWithFallback(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 filepublic Path atomicMoveWithFallback(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