| Constructor and Description |
|---|
TemporaryFile(boolean directory)
Creates a new temporary file (or directory).
|
TemporaryFile(File path,
boolean directory,
String prefix,
String suffix)
Creates a new file (or directory).
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Deletes the file or directory.
|
File |
file()
Obtains a reference to the created file.
|
File |
getFile()
Deprecated.
use
file() instead |
public TemporaryFile(boolean directory)
throws IOException
TemporaryFile(File, boolean, String, String) with all other
arguments as null.directory - should a directory be created? If false a
file is createdIOException - failed to create the filepublic TemporaryFile(File path, boolean directory, String prefix, String suffix) throws IOException
path - path to the parent directory. If null the
file/directory will be created on the default location.directory - should a directory be created? If false a
file is createdprefix - an optional prefix for the file (it a prefix is provided it
must contain at least 3 characters).suffix - an optional suffix for the fileIOException - failed to create the file@Deprecated public File getFile()
file() insteadpublic File file()
public void delete()
Copyright © 2015. All rights reserved.