public abstract class FileUtil
extends java.lang.Object
Constructor and Description |
---|
FileUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
copyFromResource(java.lang.String resource,
java.io.File target)
Creates/overwrites a file copying content from a resource.
|
static boolean |
delete(java.io.File root)
Recursively deletes a directory or just a single file.
|
public static boolean delete(java.io.File root)
root
- the file or directory to deletepublic static void copyFromResource(java.lang.String resource, java.io.File target) throws java.io.IOException
resource
- the resource file path (to be resolved using
this class' class loader)target
- the file path to create (all directories in the
path are created when necessary and possible)java.io.IOException
- an exception occurred either while trying
to get the resource or creating the target file