public final class FileUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
copyDirectory(java.lang.String src,
java.lang.String dst) |
static void |
copyDirectoryToDirectory(java.lang.String src,
java.lang.String dst) |
static void |
copyFileToDirectory(java.lang.String src,
java.lang.String dstFolder) |
static boolean |
createDirectory(java.lang.String directory) |
static boolean |
deleteDir(java.lang.String dir) |
static boolean |
deleteFile(java.lang.String filename) |
static java.util.List<java.lang.String> |
getDirectories(java.lang.String dirName)
get the list of directories in the given directory
|
static boolean |
hasChildren(java.lang.String file) |
static boolean |
isDirectoryExists(java.lang.String directory) |
static boolean |
isFileExists(java.lang.String file) |
static java.lang.String |
md5(java.io.File file) |
static byte[] |
readFromFile(java.lang.String filename) |
static boolean |
writeToFile(java.lang.String filename,
byte[] contents,
boolean overwrite) |
public static boolean writeToFile(java.lang.String filename, byte[] contents, boolean overwrite)
public static boolean isFileExists(java.lang.String file)
public static byte[] readFromFile(java.lang.String filename)
public static boolean createDirectory(java.lang.String directory)
public static boolean isDirectoryExists(java.lang.String directory)
public static boolean hasChildren(java.lang.String file)
public static boolean deleteFile(java.lang.String filename)
public static void copyDirectoryToDirectory(java.lang.String src, java.lang.String dst) throws java.io.IOException
java.io.IOException
public static void copyFileToDirectory(java.lang.String src, java.lang.String dstFolder) throws java.io.IOException
java.io.IOException
public static void copyDirectory(java.lang.String src, java.lang.String dst) throws java.io.IOException
java.io.IOException
public static boolean deleteDir(java.lang.String dir)
public static java.lang.String md5(java.io.File file) throws java.io.IOException
java.io.IOException
public static java.util.List<java.lang.String> getDirectories(java.lang.String dirName)
dirName
-