TemporaryFile

play.api.libs.Files.TemporaryFile
See theTemporaryFile companion object

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def path: Path

Concrete methods

def atomicMoveWithFallback(to: File): Path

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.

Value parameters

to

the path to the destination file

Attributes

def atomicMoveWithFallback(to: Path): Path

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.

Value parameters

to

the path to the destination file

Attributes

def copyTo(to: File, replace: Boolean): Path

Copy the file to the specified path destination and, if the destination exists, decide if replace it based on the replace parameter.

Copy the file to the specified path destination and, if the destination exists, decide if replace it based on the replace parameter.

Value parameters

replace

if it should replace an existing file.

to

the destination file.

Attributes

def copyTo(to: Path, replace: Boolean): Path

Copy the file to the specified path destination and, if the destination exists, decide if replace it based on the replace parameter.

Copy the file to the specified path destination and, if the destination exists, decide if replace it based on the replace parameter.

Value parameters

replace

if it should replace an existing file.

to

the path destination.

Attributes

def moveTo(to: File, replace: Boolean): Path

Move the file to the specified destination java.io.File. In some cases, the source and destination file may point to the same inode. See the documentation for java.nio.file.Files.move to see more details.

Move the file to the specified destination java.io.File. In some cases, the source and destination file may point to the same inode. See the documentation for java.nio.file.Files.move to see more details.

Value parameters

replace

true if an existing file should be replaced, false otherwise.

to

the path to the destination file

Attributes

def moveTo(to: Path, replace: Boolean): Path

Move the file using a java.nio.file.Path.

Move the file using a java.nio.file.Path.

Value parameters

replace

true if an existing file should be replaced, false otherwise.

to

the path to the destination file

Attributes

Deprecated methods

def atomicMoveFileWithFallback(to: File): Path

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.

Value parameters

to

the path to the destination file

Attributes

Deprecated

Since 2.8.0. Renamed to atomicMoveWithFallback.

def atomicMoveFileWithFallback(to: Path): Path

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.

Value parameters

to

the path to the destination file

Attributes

Deprecated

Since 2.8.0. Renamed to atomicMoveWithFallback.

def file: File

Attributes

Deprecated
true
def moveFileTo(to: File, replace: Boolean): Path

Move the file to the specified destination java.io.File. In some cases, the source and destination file may point to the same inode. See the documentation for java.nio.file.Files.move to see more details.

Move the file to the specified destination java.io.File. In some cases, the source and destination file may point to the same inode. See the documentation for java.nio.file.Files.move to see more details.

Value parameters

replace

true if an existing file should be replaced, false otherwise.

to

the path to the destination file

Attributes

Deprecated

Since 2.8.0. Renamed to moveTo.

def moveFileTo(to: Path, replace: Boolean): Path

Move the file using a java.nio.file.Path.

Move the file using a java.nio.file.Path.

Value parameters

replace

true if an existing file should be replaced, false otherwise.

to

the path to the destination file

Attributes

Deprecated

Since 2.8.0. Renamed to moveTo.