|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.utils.FileUtils
public class FileUtils
INTERNAL: Class that contains useful file operation methods.
Constructor Summary | |
---|---|
FileUtils()
|
Method Summary | |
---|---|
static boolean |
compare(java.io.File file1,
java.io.File file2)
INTERNAL: Compares the two files for equality. |
static boolean |
compare(java.lang.String file1,
java.lang.String file2)
INTERNAL: Compares the two files for equality. |
static boolean |
compareFileToResource(java.io.File file,
java.lang.String resourceName)
INTERNAL: Compares the contents of a file and a resource that will be loaded from classpath |
static boolean |
compareFileToResource(java.lang.String fileName,
java.lang.String resourceName)
INTERNAL: Compares the contents of a file and a resource that will be loaded from classpath |
static void |
copyFile(java.io.File source,
java.io.File target)
INTERNAL: Copies a file's content to another file. |
static void |
delete(java.io.File file_or_dir,
boolean recursive)
INTERNAL: Deletes the file or directory, recursively if specified. |
static void |
delete(java.lang.String file_or_dirname,
boolean recursive)
INTERNAL: Deletes the file or directory with the given name, recursively if specified. |
static void |
deleteDirectory(java.io.File dir,
boolean recursive)
INTERNAL: Deletes the directory, recursively if specified. |
static void |
deleteDirectory(java.lang.String dirname,
boolean recursive)
INTERNAL: Deletes the directory with the given name, recursively if specified. |
static void |
deleteFile(java.io.File file)
INTERNAL: Deletes the file. |
static void |
deleteFile(java.lang.String filename)
INTERNAL: Deletes the file with the given name. |
static boolean |
fileExists(java.lang.String filename)
INTERNAL: Returns true if file exists. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtils()
Method Detail |
---|
public static boolean fileExists(java.lang.String filename)
public static void deleteFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static void deleteFile(java.io.File file) throws java.io.IOException
java.io.IOException
public static void deleteDirectory(java.lang.String dirname, boolean recursive) throws java.io.IOException
java.io.IOException
public static void deleteDirectory(java.io.File dir, boolean recursive) throws java.io.IOException
java.io.IOException
public static void delete(java.lang.String file_or_dirname, boolean recursive) throws java.io.IOException
java.io.IOException
public static void delete(java.io.File file_or_dir, boolean recursive) throws java.io.IOException
java.io.IOException
public static boolean compare(java.lang.String file1, java.lang.String file2) throws java.io.IOException
java.io.IOException
public static boolean compare(java.io.File file1, java.io.File file2) throws java.io.IOException
java.io.IOException
public static boolean compareFileToResource(java.lang.String fileName, java.lang.String resourceName) throws java.io.IOException
java.io.IOException
public static boolean compareFileToResource(java.io.File file, java.lang.String resourceName) throws java.io.IOException
java.io.IOException
public static void copyFile(java.io.File source, java.io.File target) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |