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 PathatomicMoveFileWithFallback(File to)Deprecated.PathatomicMoveWithFallback(File to)Attempts to move source to target atomically and falls back to a non-atomic move if it fails.PathcopyTo(Path destination, boolean replace)Copy the file to the specified path destination and, if the destination exists, decide if replace it based on thereplaceparameter.PathmoveFileTo(File to, boolean replace)Deprecated.PathmoveTo(File to, boolean replace)Move the file to the specified destinationFile.Pathpath()Files.TemporaryFileCreatortemporaryFileCreator()-
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:
pathin interfaceFiles.TemporaryFile- Returns:
- the path to the temporary file.
-
temporaryFileCreator
public Files.TemporaryFileCreator temporaryFileCreator()
- Specified by:
temporaryFileCreatorin interfaceFiles.TemporaryFile
-
moveFileTo
@Deprecated public Path moveFileTo(File to, boolean replace)
Deprecated.Description copied from interface:Files.TemporaryFileMove 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:
moveFileToin 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.TemporaryFileMove 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:
moveToin 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.TemporaryFileCopy the file to the specified path destination and, if the destination exists, decide if replace it based on thereplaceparameter.- Specified by:
copyToin 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.TemporaryFileAttempts 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:
atomicMoveFileWithFallbackin interfaceFiles.TemporaryFile- Parameters:
to- the path to the destination file
-
atomicMoveWithFallback
public Path atomicMoveWithFallback(File to)
Description copied from interface:Files.TemporaryFileAttempts 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:
atomicMoveWithFallbackin interfaceFiles.TemporaryFile- Parameters:
to- the path to the destination file
-
-