public class ExtendedTemporaryFolder
extends org.junit.rules.ExternalResource
| Constructor and Description |
|---|
ExtendedTemporaryFolder() |
ExtendedTemporaryFolder(File parentFolder) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
after() |
protected void |
before() |
void |
create()
for testing purposes only.
|
void |
delete()
Delete all files and folders under the temporary folder.
|
File |
getRoot() |
protected static boolean |
isWindows() |
File |
newFile()
Returns a new fresh file with a random name under the temporary folder.
|
File |
newFile(String fileName) |
File |
newFolder() |
File |
newFolder(String... folderNames)
Returns a new fresh folder with the given name(s) under the temporary
folder.
|
File |
newFolder(String folder)
Returns a new fresh folder with the given name under the temporary
folder.
|
public ExtendedTemporaryFolder()
public ExtendedTemporaryFolder(File parentFolder)
protected void before()
throws Throwable
before in class org.junit.rules.ExternalResourceThrowableprotected void after()
after in class org.junit.rules.ExternalResourcepublic void create()
throws IOException
IOExceptionpublic File newFile() throws IOException
IOExceptionpublic File newFolder(String folder) throws IOException
IOExceptionpublic File newFolder(String... folderNames) throws IOException
IOExceptionpublic File getRoot()
public void delete()
Ruleprotected static boolean isWindows()
public File newFolder() throws IOException
IOExceptionpublic File newFile(String fileName) throws IOException
IOExceptionCopyright © 2011-2013 Wakaleo Consulting. All Rights Reserved.