Adds a file or a directory to this temporary directory by copying it from the source location.
Adds a file or a directory to this temporary directory by copying it from the source location. In case of a directory, the whole tree is copied.
the source location, must be a regular file or a directory
the target location
IllegalArgumentException
if f is not a regular file or a directory
IllegalStateException
if this object is not in active state
Removes all files and directories added or created before.
Removes all files and directories added or created before.
The root of this temporary directory itself is not deleted and it remains in "active" state, which means that new files and directories still can be added or created.
true
if successful, false
otherwise
IllegalStateException
if this object is not in active state
Can only be successful if no files or directories have been added by bypassing the methods of this object.
Creates a new directory within this temporary directory.
Creates a new directory within this temporary directory.
If the dir
argument is empty, a unique directory is created.
If the dir
argument denotes a path with elements separated by any
characters defined by Separators
, the whole path is created as necessary,
but the last element of the path must not exist before.
the target location
IOException
if the directory cannot be created
Creates a new file within this temporary directory.
Creates a new file within this temporary directory.
If the file
argument is empty, a unique file is created.
If the file
argument denotes a path with elements separated by any
characters defined by Separators
, the whole path is created as necessary,
but the last element (the regular file) must not exist before.
the target location
IOException
if the file cannot be created
Removes all files and directories added before and the root of the temporary directory itself.
Removes all files and directories added before and the root of the temporary directory itself.
Sets this temporary directory to "inactive" state, which means that any
subsequent method calls other than isInActiveState
will throw an
illegal-state exception.
true
if successful, false
otherwise
IllegalStateException
if this object is not in active state
Can only be successful if no files or directories have been added by bypassing the methods of this object.