|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ops4j.io.FileUtils
public final class FileUtils
Utility methods for manipulation of Files.
Method Summary | |
---|---|
static void |
copyFile(java.io.File src,
java.io.File dest,
StreamMonitor monitor)
Copies a file. |
static boolean |
delete(java.io.File file)
Deletes the file or recursively deletes a directory depending on the file passed. |
static java.io.File |
getFileFromClasspath(java.lang.String filePath)
Searches the classpath for the file denoted by the file path and returns the corresponding file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void copyFile(java.io.File src, java.io.File dest, StreamMonitor monitor) throws java.io.IOException, java.io.FileNotFoundException
src
- The source file.dest
- The destination file.monitor
- The monitor to use for reporting.
java.io.IOException
- if any underlying I/O problem occurs.
java.io.FileNotFoundException
- if the source file does not exist.public static java.io.File getFileFromClasspath(java.lang.String filePath) throws java.io.FileNotFoundException
filePath
- path to the file
java.io.FileNotFoundException
- if the file cannot be foundpublic static boolean delete(java.io.File file)
file
- file or directory to be deleted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |