| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.actf.util.FileUtils
public class FileUtils
| Field Summary | |
|---|---|
| static String | LINE_SEPLine separator. | 
| Constructor Summary | |
|---|---|
| FileUtils() | |
| Method Summary | |
|---|---|
| static boolean | copyFile(org.osgi.framework.Bundle bundle,
         org.eclipse.core.runtime.IPath file,
         String savePath,
         boolean overWrite)Copy file in bundle to specified path | 
| static void | copyFile(FileInputStream source,
         FileOutputStream dest)copy a file | 
| static boolean | copyFile(File source,
         String dest,
         boolean overWrite)copy a file | 
| static boolean | copyFile(String source,
         String dest,
         boolean overWrite)copy a file | 
| static void | copyFiles(File baseDir,
          File newParent,
          String pattern)Copy files matching a certain pattern from one directory to another | 
| static void | deleteFiles(File rootDir)delete files or directories under the specified root directory | 
| static void | deleteFiles(File baseDir,
            String pattern)delete files or directories matching a specified pattern | 
| static void | findFiles(FilenameFilter filter,
          File baseDir,
          List<File> fileList)Find files matching a specified pattern in a specified location | 
| static File[] | findFiles(String fileDesc,
          File baseDir)Find files matching a specified pattern in a specified location | 
| static String | getActfTempDir()Create the ACTF temporary directory which is a subdirectory of the value of java.io.tmpdir Checking is done to ensure a File.separator is added if needed. | 
| static boolean | isAvailableDirectory(String path)Confirm availability of the directory | 
| static String | replaceWhiteSpaceInUrl(String target)Replace white space " " in URL string with "%20" | 
| static boolean | saveToFile(InputStream is,
           String savePath,
           boolean overWrite)Save target input stream to specified path | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String LINE_SEP
| Constructor Detail | 
|---|
public FileUtils()
| Method Detail | 
|---|
public static String replaceWhiteSpaceInUrl(String target)
target - the target URL String
public static boolean copyFile(File source,
                               String dest,
                               boolean overWrite)
source - -
            the source Filedest - -
            the destination file path in StringoverWrite - -
            allow to overwrite the existing file or not
public static boolean copyFile(String source,
                               String dest,
                               boolean overWrite)
source - -
            the source file path in Stringdest - -
            the destination file path in StringoverWrite - -
            allow to overwrite the existing file or not
public static void copyFile(FileInputStream source,
                            FileOutputStream dest)
                     throws IOException
source - -
            the source file input streamdest - -
            the destination file output stream
IOException
public static void copyFiles(File baseDir,
                             File newParent,
                             String pattern)
baseDir - -
            the directory to copy from - must be existingnewParent - -
            the directory to copy to - must be existingpattern - -
            the pattern of files to copy
public static boolean copyFile(org.osgi.framework.Bundle bundle,
                               org.eclipse.core.runtime.IPath file,
                               String savePath,
                               boolean overWrite)
bundle - the target bundlefile - the target file pathsavePath - the target path to copy the fileoverWrite - allow to overwrite the existing file or not
public static boolean saveToFile(InputStream is,
                                 String savePath,
                                 boolean overWrite)
is - the target input streamsavePath - the target path to store the fileoverWrite - allow to overwrite the existing file or not
public static void deleteFiles(File rootDir)
rootDir - -
            root directory from which to start - must be existing
            directory
public static void deleteFiles(File baseDir,
                               String pattern)
baseDir - -
            root directory from which to start - must be existing
            directorypattern - -
            the pattern of file names to erase
public static File[] findFiles(String fileDesc,
                               File baseDir)
fileDesc - -
            the filename pattern you are searching forbaseDir - -
            the directory to search - must be existing
public static void findFiles(FilenameFilter filter,
                             File baseDir,
                             List<File> fileList)
filter - -
            filename filter of matching patternbaseDir - -
            the directory from which to start the searchfileList - -
            a Linked List where the found files will be returnedpublic static boolean isAvailableDirectory(String path)
path - target directory path
public static String getActfTempDir()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||