public final class FileUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
JBOSS_FILE |
private static Logger |
LOGGER |
private static java.lang.String |
PROTOCOL_FILE
Constant for the file URL protocol.
|
| Modifier | Constructor and Description |
|---|---|
private |
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.io.File |
fileFromUri(java.net.URI uri)
Tries to convert the specified URI to a file object.
|
static java.lang.String |
getFileExtension(java.io.File file) |
static boolean |
isFile(java.net.URL url) |
static void |
makeParentDirs(java.io.File file)
Creates the parent directories for the given File.
|
static void |
mkdir(java.io.File dir,
boolean createDirectoryIfNotExisting)
Asserts that the given directory exists and creates it if necessary.
|
private static final java.lang.String PROTOCOL_FILE
private static final java.lang.String JBOSS_FILE
private static final Logger LOGGER
public static java.io.File fileFromUri(java.net.URI uri)
uri - the URIpublic static boolean isFile(java.net.URL url)
public static java.lang.String getFileExtension(java.io.File file)
public static void mkdir(java.io.File dir,
boolean createDirectoryIfNotExisting)
throws java.io.IOException
dir - the directory that shall existcreateDirectoryIfNotExisting - specifies if the directory shall be created if it does not exist.java.io.IOException - thrown if the directory could not be created.public static void makeParentDirs(java.io.File file)
throws java.io.IOException
file - java.io.IOException