A new temporary Directory. TemporaryDirectorys may be used within resource expressions:

try (tempDirectory = temporaryDirectory.TemporaryDirectory()) {
    // ...
}

If possible, a TemporaryDirectory will be deleted upon invocation of its Destroyable.destroy() method.

no subtypes hierarchy

Initializer
TemporaryDirectory(String? prefix)
Parameters:
  • prefix

    The leading part of the temporary directory name to use, or null for the system default.

Throws
  • Exception

    If the prefix cannot be used to generate a directory name, an I/O error occurs, or the parent directory is not specified and a suitable temporary directory cannot be determined.

Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: Directory
Attributes inherited from: ExistingResource
Attributes inherited from: Resource
Inherited Methods
Methods inherited from: Object
Methods inherited from: Destroyable
Methods inherited from: Directory
Methods inherited from: ExistingResource