Interface Files.TemporaryFile
- All Known Implementing Classes:
Files.DelegateTemporaryFile
- Enclosing class:
- Files
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated as of 2.8.0.default PathDeprecated.Deprecated as of 2.8.0.Attempts to move source to target atomically and falls back to a non-atomic move if it fails.default PathAttempts to move source to target atomically and falls back to a non-atomic move if it fails.default PathCopy the temporary file to the specified destination.default PathCopy the file to the specified destination and, if the destination exists, decide if replace it based on thereplaceparameter.default PathCopy the file to the specified path destination.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.moveFileTo(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 PathMove the file using aFile.Move the file to the specified destinationFile.default PathMove the file using aPath.default PathMove the file using aPath.path()
-
Method Details
-
path
Path path()- Returns:
- the path to the temporary file.
-
temporaryFileCreator
Files.TemporaryFileCreator temporaryFileCreator() -
copyTo
Copy the temporary file to the specified destination.- Parameters:
destination- the file destination.- See Also:
-
copyTo
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
Copy the file to the specified path destination.- Parameters:
destination- the path destination.- See Also:
-
copyTo
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.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
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.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
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:
-
moveTo
Move the file using aFile.- Parameters:
destination- the path to the destination file- See Also:
-
moveTo
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
Move the file using aPath.- Parameters:
to- the path to the destination file.- See Also:
-
moveTo
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:
-
atomicMoveFileWithFallback
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.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
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
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
-