Interface Files.TemporaryFile
-
- All Known Implementing Classes:
Files.DelegateTemporaryFile
- Enclosing class:
- Files
public static interface Files.TemporaryFileA temporary file created by a TemporaryFileCreator.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description PathatomicMoveFileWithFallback(File to)Deprecated.Deprecated as of 2.8.0.default PathatomicMoveFileWithFallback(Path to)Deprecated.Deprecated as of 2.8.0.PathatomicMoveWithFallback(File to)Attempts to move source to target atomically and falls back to a non-atomic move if it fails.default PathatomicMoveWithFallback(Path to)Attempts to move source to target atomically and falls back to a non-atomic move if it fails.default PathcopyTo(File destination)Copy the temporary file to the specified destination.default PathcopyTo(File destination, boolean replace)Copy the file to the specified destination and, if the destination exists, decide if replace it based on thereplaceparameter.default PathcopyTo(Path destination)Copy the file to the specified path destination.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.default PathmoveFileTo(File destination)Deprecated.Deprecated as of 2.8.0.PathmoveFileTo(File destination, boolean replace)Deprecated.Deprecated as of 2.8.0.default PathmoveFileTo(Path to)Deprecated.Deprecated as of 2.8.0.default PathmoveFileTo(Path to, boolean replace)Deprecated.Deprecated as of 2.8.0.default PathmoveTo(File destination)Move the file using aFile.PathmoveTo(File destination, boolean replace)Move the file to the specified destinationFile.default PathmoveTo(Path to)Move the file using aPath.default PathmoveTo(Path to, boolean replace)Move the file using aPath.Pathpath()Files.TemporaryFileCreatortemporaryFileCreator()
-
-
-
Method Detail
-
path
Path path()
- Returns:
- the path to the temporary file.
-
temporaryFileCreator
Files.TemporaryFileCreator temporaryFileCreator()
-
copyTo
default Path copyTo(File destination)
Copy the temporary file to the specified destination.- Parameters:
destination- the file destination.- See Also:
copyTo(Path, boolean)
-
copyTo
default Path copyTo(File destination, boolean replace)
Copy the file to the specified destination and, if the destination exists, decide if replace it based on thereplaceparameter.- Parameters:
destination- the file destination.replace- if it should replace an existing file.- See Also:
copyTo(Path, boolean)
-
copyTo
default Path copyTo(Path destination)
Copy the file to the specified path destination.- Parameters:
destination- the path destination.- See Also:
copyTo(Path, boolean)
-
copyTo
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 thereplaceparameter.- Parameters:
destination- the path destination.replace- if it should replace an existing file.
-
moveFileTo
@Deprecated default Path moveFileTo(File destination)
Deprecated.Deprecated as of 2.8.0. Renamed tomoveTo(File).Move the file using aFile.- Parameters:
destination- the path to the destination file- See Also:
moveFileTo(Path, boolean)
-
moveFileTo
@Deprecated Path moveFileTo(File destination, boolean replace)
Deprecated.Deprecated as of 2.8.0. Renamed tomoveTo(File, boolean).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.- Parameters:
destination- the path to the destination filereplace- true if an existing file should be replaced, false otherwise.
-
moveFileTo
@Deprecated default Path moveFileTo(Path to)
Deprecated.Deprecated as of 2.8.0. Renamed tomoveTo(Path).Move the file using aPath.- Parameters:
to- the path to the destination file.- See Also:
moveFileTo(Path, boolean)
-
moveFileTo
@Deprecated default Path moveFileTo(Path to, boolean replace)
Deprecated.Deprecated as of 2.8.0. Renamed tomoveTo(Path, boolean).Move the file using aPath.- Parameters:
to- the path to the destination filereplace- true if an existing file should be replaced, false otherwise.- See Also:
moveFileTo(Path, boolean)
-
moveTo
default Path moveTo(File destination)
Move the file using aFile.- Parameters:
destination- the path to the destination file- See Also:
moveTo(Path, boolean)
-
moveTo
Path moveTo(File destination, boolean replace)
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.- Parameters:
destination- the path to the destination filereplace- true if an existing file should be replaced, false otherwise.
-
moveTo
default Path moveTo(Path to)
Move the file using aPath.- Parameters:
to- the path to the destination file.- See Also:
moveTo(Path, boolean)
-
moveTo
default Path moveTo(Path to, boolean replace)
Move the file using aPath.- Parameters:
to- the path to the destination filereplace- true if an existing file should be replaced, false otherwise.- See Also:
moveTo(Path, boolean)
-
atomicMoveFileWithFallback
@Deprecated Path atomicMoveFileWithFallback(File to)
Deprecated.Deprecated as of 2.8.0. Renamed toatomicMoveWithFallback(File).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.
- Parameters:
to- the path to the destination file
-
atomicMoveFileWithFallback
@Deprecated default Path atomicMoveFileWithFallback(Path to)
Deprecated.Deprecated as of 2.8.0. Renamed toatomicMoveWithFallback(Path).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.
- Parameters:
to- the path to the destination file
-
atomicMoveWithFallback
Path atomicMoveWithFallback(File to)
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.
- Parameters:
to- the path to the destination file
-
atomicMoveWithFallback
default Path atomicMoveWithFallback(Path to)
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.
- Parameters:
to- the path to the destination file
-
-