public class Files extends Object
files
.Constructor and Description |
---|
Files() |
Modifier and Type | Method and Description |
---|---|
static File |
createFile(File base,
String... paths) |
static String |
createPath(String... paths) |
static boolean |
deleteRecursively(File dir) |
static File |
dropExtension(File file)
Returns a new file with the extension dropped.
|
static String |
getExtension(File file)
Returns the extension of the file or an empty string if no extension is found.
|
static void |
unzip(File zipFile,
File targetDir)
Unzips the zip file to the target directory.
|
public static String getExtension(File file)
file
- the file to find the extension ofpublic static File dropExtension(File file)
file
- the file to drop the extension forpublic static boolean deleteRecursively(File dir)
public static void unzip(File zipFile, File targetDir) throws IOException
zipFile
- the zip file to unziptargetDir
- the directory to extract the zip file toIOException
- if an I/O error occursCopyright © 2013 JBoss by Red Hat. All Rights Reserved.