|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.utils.FileManipulator
public class FileManipulator
A set of useful utility for File manipulation operations
| Constructor Summary | |
|---|---|
FileManipulator()
|
|
| Method Summary | |
|---|---|
static void |
copyDir(File srcDir,
File dstDir)
Copies all files under srcDir to dstDir. |
static void |
copyFile(File src,
File dst)
Copies src file to dst file. |
static void |
copyFileToDir(File src,
File dst)
Copies src file to dst directory. |
static boolean |
deleteDir(File dir)
Deletes all files and subdirectories under dir. |
static void |
deleteDir(String directory)
|
static File[] |
getMatchingFiles(String sourceDir,
String fileNamePrefix,
String extension)
Get the list of file with a prefix of fileNamePrefix & an extension of
extension |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileManipulator()
| Method Detail |
|---|
public static boolean deleteDir(File dir)
dir - The directory to be deleted
public static void copyDir(File srcDir,
File dstDir)
throws IOException
srcDir - The source dirdstDir - The destination dir
IOException - If an error occrs while copying
public static void copyFile(File src,
File dst)
throws IOException
src - The source filedst - The destiination file
IOException - If an Exception occurs while copying
public static void copyFileToDir(File src,
File dst)
throws IOException
src - The file to be copieddst - The destination directory to which the file has to be copied
IOException - If an error occurs while copying
public static File[] getMatchingFiles(String sourceDir,
String fileNamePrefix,
String extension)
fileNamePrefix & an extension of
extension
sourceDir - The directory in which to search the filesfileNamePrefix - The prefix to look forextension - The extension to look for
fileNamePrefix & an extension of
extensionpublic static void deleteDir(String directory)
directory - The directory to be deleteddeleteDir(File)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||