public class Paths
extends java.lang.Object
Path-related utility methods.| Modifier and Type | Class and Description |
|---|---|
private static class |
Paths.DeletionVisitor |
| Constructor and Description |
|---|
Paths() |
| Modifier and Type | Method and Description |
|---|---|
static void |
delete(java.nio.file.Path path)
Delete the given
Path whether it is a directory or a simple file. |
static void |
deleteQuietly(java.nio.file.Path path)
Delete the given
Path without throwing any Exception if any
occurs during the deletion. |
private static void |
doDelete(java.nio.file.Path path,
boolean quiet) |
static java.nio.file.Path |
getParent(java.nio.file.Path path) |
public static void deleteQuietly(java.nio.file.Path path)
Path without throwing any Exception if any
occurs during the deletion. If the path is a directory, it will be
deleted recursively.path - the path to deletepublic static void delete(java.nio.file.Path path)
throws java.io.IOException
Path whether it is a directory or a simple file.
If the path is a directory, it will be deleted recursively.path - the path to deletejava.io.IOExceptionprivate static void doDelete(java.nio.file.Path path,
boolean quiet)
throws java.io.IOException
java.io.IOExceptionpublic static java.nio.file.Path getParent(java.nio.file.Path path)