Package play.libs
Class Files.DelegateTemporaryFile
- Object
-
- play.libs.Files.DelegateTemporaryFile
-
- All Implemented Interfaces:
Files.TemporaryFile
- Enclosing class:
- Files
public static class Files.DelegateTemporaryFile extends Object implements Files.TemporaryFile
Delegates to the Scala implementation.
-
-
Constructor Summary
Constructors Constructor Description DelegateTemporaryFile(play.api.libs.Files.TemporaryFile temporaryFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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 thereplace
parameter.Path
moveFileTo(File to, boolean replace)
Deprecated.Path
moveTo(File to, boolean replace)
Move the file to the specified destinationFile
.Path
path()
Files.TemporaryFileCreator
temporaryFileCreator()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface play.libs.Files.TemporaryFile
atomicMoveFileWithFallback, atomicMoveWithFallback, copyTo, copyTo, copyTo, moveFileTo, moveFileTo, moveFileTo, moveTo, moveTo, moveTo
-
-
-
-
Method Detail
-
path
public Path path()
- Specified by:
path
in interfaceFiles.TemporaryFile
- Returns:
- the path to the temporary file.
-
temporaryFileCreator
public Files.TemporaryFileCreator temporaryFileCreator()
- Specified by:
temporaryFileCreator
in interfaceFiles.TemporaryFile
-
moveFileTo
@Deprecated public Path moveFileTo(File to, boolean replace)
Deprecated.Description copied from interface:Files.TemporaryFile
Move the file to the specified destinationFile
. In some cases, the source and destination file may point to the sameinode
. See the documentation forFiles.move(Path, Path, CopyOption...)
to see more details.- Specified by:
moveFileTo
in interfaceFiles.TemporaryFile
- Parameters:
to
- the path to the destination filereplace
- true if an existing file should be replaced, false otherwise.
-
moveTo
public Path moveTo(File to, boolean replace)
Description copied from interface:Files.TemporaryFile
Move the file to the specified destinationFile
. In some cases, the source and destination file may point to the sameinode
. See the documentation forFiles.move(Path, Path, CopyOption...)
to see more details.- Specified by:
moveTo
in interfaceFiles.TemporaryFile
- Parameters:
to
- the path to the destination filereplace
- true if an existing file should be replaced, false otherwise.
-
copyTo
public Path copyTo(Path destination, boolean replace)
Description copied from interface:Files.TemporaryFile
Copy the file to the specified path destination and, if the destination exists, decide if replace it based on thereplace
parameter.- Specified by:
copyTo
in interfaceFiles.TemporaryFile
- Parameters:
destination
- the path destination.replace
- if it should replace an existing file.
-
atomicMoveFileWithFallback
@Deprecated public Path atomicMoveFileWithFallback(File to)
Deprecated.Description copied from interface:Files.TemporaryFile
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.
- Specified by:
atomicMoveFileWithFallback
in interfaceFiles.TemporaryFile
- Parameters:
to
- the path to the destination file
-
atomicMoveWithFallback
public Path atomicMoveWithFallback(File to)
Description copied from interface:Files.TemporaryFile
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.
- Specified by:
atomicMoveWithFallback
in interfaceFiles.TemporaryFile
- Parameters:
to
- the path to the destination file
-
-