public class FileHelper extends Object
| Constructor and Description |
|---|
FileHelper() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areFilesIdentical(File f1,
File f2)
Compare two files for equality.
|
static boolean |
cleanDirectory(File dir)
Removes all files and child directories in the specified directory.
|
static boolean |
copy(String from,
String to)
This method is used to perform directory copy
|
static boolean |
createFile(File file)
Create a File.
|
static boolean |
createFolder(File folder)
Create a Foldr.
|
static boolean |
fileCopy(String source,
String destination)
Make a copy of the source file in the destination file.
|
static boolean |
fileCopy(String source,
String destination,
boolean overwrite)
Make a copy of the source file in the destination file.
|
static String |
fileFingerprint(File file)
Compute the fingerprint for a file.
|
static void |
finalizeDiscardedObjects()
Reclaim memory, run object finalizers
|
static String |
getTimestamp()
This method is used to create a timestamp that could be used to create
file names
|
static String |
readFile(File aFile)
Read the file into a String and return the String value.
|
public static boolean fileCopy(String source, String destination) throws IOException
source - the source filedestination - the destination fileIOExceptionpublic static boolean fileCopy(String source, String destination, boolean overwrite) throws IOException
source - the source filedestination - the destination fileoverwrite - true if the destination file can be overwritten if it existsIOExceptionpublic static String fileFingerprint(File file) throws IOException
IOExceptionpublic static boolean createFile(File file)
file - - File to Create.public static boolean createFolder(File folder)
folder - - folder to Create.public static boolean cleanDirectory(File dir)
public static void finalizeDiscardedObjects()
public static boolean areFilesIdentical(File f1, File f2) throws IOException
IOExceptionpublic static boolean copy(String from, String to) throws IOException
from - path to the source dirto - path to the destination dirIOException - if there are problems in copying the firpublic static String getTimestamp()
Copyright © 2011-2016 OpenESB Community. All Rights Reserved.