public final class Files
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteRecursively(java.io.File dir)
Recursively delete a directory.
|
static java.io.File |
toFile(java.net.URI uri)
Convert a URI to a file but handle a corner case with UNC paths which do
not parse correctly.
|
static java.io.File |
toFile(java.net.URL url)
Convert a URL to a file but handle a corner case with UNC paths which do
not parse correctly.
|
public static java.io.File toFile(java.net.URL url)
throws java.net.URISyntaxException
url - URL to convertjava.net.URISyntaxException - if the URL cannot be converted to a URIpublic static java.io.File toFile(java.net.URI uri)
uri - URI to convertpublic static void deleteRecursively(java.io.File dir)
throws java.io.IOException
dir - Root directory to deletejava.io.IOException - Security errors and any other IO errors encountered
are raised as IOExceptions