public class PathTools
extends java.lang.Object
Constructor and Description |
---|
PathTools() |
Modifier and Type | Method and Description |
---|---|
static java.nio.file.Path |
createTempPath(java.lang.String prefix,
java.lang.String suffix,
boolean deleteOnExit)
Creates a temporary file.
|
static void |
prune(java.nio.file.Path path)
Prunes the given path.
|
public static java.nio.file.Path createTempPath(java.lang.String prefix, java.lang.String suffix, boolean deleteOnExit) throws java.io.IOException
prefix
- The prefix for the temporary file.suffix
- The suffix for the temporary file.deleteOnExit
- If the file should be deleted when the JVM exits.java.io.IOException
- If the create fails.public static void prune(java.nio.file.Path path) throws java.io.IOException
path
- The path to delete.java.io.IOException
- If the prune failed for any reason. This might indicate that the prune was only partially
successful.