TemporaryFileCreator

play.api.libs.Files.TemporaryFileCreator

Logic for creating a temporary file. Users should try to clean up the file themselves, but this TemporaryFileCreator implementation may also try to clean up any leaked files, e.g. when the Application or JVM stops.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def create(prefix: String, suffix: String): TemporaryFile

Creates a temporary file.

Creates a temporary file.

Value parameters

prefix

the prefix of the file.

suffix

the suffix of the file

Attributes

Returns

the newly created temporary file.

def create(path: Path): TemporaryFile

Creates a temporary file from an already existing file.

Creates a temporary file from an already existing file.

Value parameters

path

the existing temp file path

Attributes

Returns

a Temporary file wrapping the existing file.

Deletes the temporary file.

Deletes the temporary file.

Value parameters

file

the temporary file to be deleted.

Attributes

Returns

the boolean value of the FS delete operation, or an throwable.

Concrete methods

def asJava: TemporaryFileCreator

Attributes

Returns

the Java version for the temporary file creator.