|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas_lib.files.FileUtils
public class FileUtils
This class manages operation done many times by JOnAS on files, like copying them.
Method Summary | |
---|---|
static void |
copyDirectory(File src,
File dest)
Copy a directory recursively |
static void |
copyDirectory(String src,
String dest)
Copy a directory recursively |
static void |
copyFile(File src,
File dest)
Copy a file |
static void |
copyFile(String src,
String dest)
Copy a file |
static boolean |
delete(File f)
|
static boolean |
delete(String path)
|
static void |
dump(InputStream in,
File entryFile)
Write the given input stream in the given file. |
static String[] |
getFileList(File dir,
String prefix,
String suffix)
return a list of files with this suffix in directory dstr |
static void |
unpack(JarFile packedJar,
File dest)
Unpack the source archive in a given directory and returns directory directory created. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void unpack(JarFile packedJar, File dest) throws FileUtilsException
packedJar
- source JarFile to be unpackeddest
- the destination folder
FileUtilsException
- When unpack failspublic static void dump(InputStream in, File entryFile) throws FileUtilsException
in
- the inputStream to copy.entryFile
- the file where the inputStream must be dumped.
FileUtilsException
- if the dump failed.public static void copyFile(String src, String dest) throws FileUtilsException
src
- source filedest
- dest file
FileUtilsException
- if the copy of the file failedpublic static void copyFile(File src, File dest) throws FileUtilsException
src
- source filedest
- dest file
FileUtilsException
- if the copy of the file failedpublic static boolean delete(String path)
path
- file/directory to be deleted
public static boolean delete(File f)
f
- file/directory to be deleted
public static void copyDirectory(String src, String dest) throws FileUtilsException
src
- source directorydest
- dest directory
FileUtilsException
- if the copy of the directory failedpublic static void copyDirectory(File src, File dest) throws FileUtilsException
src
- source directorydest
- dest directory
FileUtilsException
- if the copy of the directory failedpublic static String[] getFileList(File dir, String prefix, String suffix)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |