public class WorkDir
extends java.lang.Object
Constructor and Description |
---|
WorkDir(java.nio.file.Path path) |
Modifier and Type | Method and Description |
---|---|
void |
ensureEmpty()
Ensure that the work directory is empty.
|
java.nio.file.Path |
getEmptyPathDir()
Get the unique work directory while ensuring that it is empty (if not).
|
java.nio.file.Path |
getPath()
Get the test specific directory to use for work directory.
|
java.nio.file.Path |
getPathFile(java.lang.String name)
Get a
Path file reference for content inside of the test specific work directory. |
public java.nio.file.Path getPath()
Name is derived from the test classname & method name.
public java.nio.file.Path getPathFile(java.lang.String name)
Path
file reference for content inside of the test specific work directory.
Note: No assertions are made if the file exists or not.
name
- the path name of the file (supports deep paths)public void ensureEmpty()
Useful for repeated testing without using the maven clean
goal (such as within Eclipse).
public java.nio.file.Path getEmptyPathDir()
Copyright © 1995–2024 Mort Bay Consulting. All rights reserved.