|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dbunit.util.FileHelper
public class FileHelper
Utility that provides some general methods for working with File
objects.
Method Summary | |
---|---|
static void |
copyFile(File srcFile,
File destFile)
Copy file. |
static InputSource |
createInputSource(File file)
|
static boolean |
deleteDirectory(File directory)
Recursively deletes the given directory |
static void |
deleteDirectory(File directory,
boolean failOnError)
Recursively deletes the given directory |
static List |
readLines(File theFile)
Get a list of Strings from a given file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void deleteDirectory(File directory, boolean failOnError)
directory
- The directory to deletefailOnError
- If an exception should be thrown in case the deletion did not work.public static boolean deleteDirectory(File directory)
directory
- The directory to delete
true
if the deletion was successfully.public static InputSource createInputSource(File file) throws MalformedURLException
MalformedURLException
public static void copyFile(File srcFile, File destFile) throws IOException
srcFile
- the src filedestFile
- the dest file
IOException
public static List readLines(File theFile) throws IOException
theFile
- the file to be read
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |