public class TemporaryFolder
extends java.lang.Object
| Constructor | Description |
|---|---|
TemporaryFolder() |
| Modifier and Type | Method | Description |
|---|---|---|
java.io.File |
getRoot() |
Return the root of the temporary folder.
|
java.io.File |
newFile(java.lang.String name) |
Create a new regular file inside the root folder.
|
java.io.File |
newFolder(java.lang.String name) |
Create a new directory inside the root folder.
|
public java.io.File newFile(java.lang.String name)
throws java.io.IOException
name - the name of the file to createFile instancejava.io.IOException - if an error occurred while create the filejava.lang.IllegalStateException - if the file already existpublic java.io.File newFolder(java.lang.String name)
name - the name of the directory to createFile instancepublic java.io.File getRoot()
File instance for the temporary folder rootCopyright © 2018 Oracle Corporation. All rights reserved.