play.api.libs.Files.DefaultTemporaryFileCreator
Attempts to move source to target atomically and falls back to a non-atomic move if it fails.
Attempts to move source to target atomically and falls back to a non-atomic move if it fails.
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.
the path to the destination file
Move the file using a java.nio.file.Path.
Move the file using a java.nio.file.Path.
the path to the destination file
true if an existing file should be replaced, false otherwise.
Move the file using a java.io.File.
Move the file using a java.io.File.
the path to the destination file
true if an existing file should be replaced, false otherwise.
A temporary file hold a reference to a real path, and will delete it when the reference is garbage collected.