public class FileUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static char |
SEP |
Constructor and Description |
---|
FileUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
buildPath(java.lang.String... files) |
static void |
closeQuietly(java.io.Closeable closeable) |
static void |
copy(java.io.File sourceFile,
java.io.File targetFile) |
static boolean |
delete(java.io.File root,
java.lang.String fileName) |
static java.util.List<java.io.File> |
getDirList(java.io.File dir)
Gets a list of sub-dirs in the specified dir.
|
static java.util.List<java.io.File> |
getFileList(java.io.File f)
Gets a list of files in the specified dir.
|
static java.lang.String |
getHomeDir() |
static java.io.File |
getJarFile() |
static java.lang.String |
getJarName() |
static java.io.File |
getLocalCheckSumFile() |
static java.io.File |
getTmpDir() |
static boolean |
isMac() |
static boolean |
isWindows() |
static java.io.File |
makeFile(java.lang.String path,
java.lang.String fileName) |
static void |
purgeDir(java.io.File dir)
Removes a directory and its contents
|
public static java.io.File getJarFile() throws java.net.URISyntaxException
java.net.URISyntaxException
public static boolean delete(java.io.File root, java.lang.String fileName)
public static void purgeDir(java.io.File dir)
dir
- the dir to removepublic static java.util.List<java.io.File> getDirList(java.io.File dir)
dir
- the dir to traversepublic static java.util.List<java.io.File> getFileList(java.io.File f)
f
- the dir to traversepublic static java.io.File makeFile(java.lang.String path, java.lang.String fileName)
public static void copy(java.io.File sourceFile, java.io.File targetFile) throws java.io.IOException
java.io.IOException
public static void closeQuietly(java.io.Closeable closeable)
public static java.io.File getTmpDir()
public static java.lang.String getHomeDir()
public static java.lang.String buildPath(java.lang.String... files)
public static boolean isWindows()
public static boolean isMac()
public static java.io.File getLocalCheckSumFile()
public static java.lang.String getJarName()
Copyright © 2004-2014 The YAWL Foundation.