class TemporaryFileUtils extends java.lang.Object
| Constructor and description |
|---|
TemporaryFileUtils
() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static java.io.File |
newTemporaryFileFor(java.io.File file)Generate a temporary file based on the given file. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Generate a temporary file based on the given file. Use it to generate temporary locations to use for file operations that might be interupted and let incomplete data on the file system, for instance downloads or extraction. The temporary file contains the current process and thread IDs to avoid conflicts. It is located in the same directory as the provided file. No file operation is actually performed, it just generates a path. It works with directories and files.
file - the file to base the new name on.