public class TemporaryFolder extends Object
| Constructor and Description |
|---|
TemporaryFolder() |
| Modifier and Type | Method and Description |
|---|---|
File |
newFile(String name)
Create a new regular file inside the root folder.
|
File |
newFolder(String name)
Create a new directory inside the root folder.
|
File |
root()
Return the root of the temporary folder.
|
public File newFile(String name) throws IOException
name - the name of the file to createFile instanceIOException - if an error occurred while create the fileIllegalStateException - if the file already existpublic File newFolder(String name)
name - the name of the directory to createFile instanceCopyright © 2018–2019 Oracle Corporation. All rights reserved.