| 
 | Oracle® WebCenter Content Site Studio for External Applications Java API Reference 11g Release 1 (11.1.1) E17273-03 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
   oracle.stellent.wcm.common.io.FileUtils
oracle.stellent.wcm.common.io.FileUtils
public class FileUtils
| Constructor Summary | |
|---|---|
| FileUtils() | |
| Method Summary | |
|---|---|
| static boolean | assureDirectoryExists(java.io.File dir, ILog log)Make sure that the directory exists, creating it if necessary | 
| static boolean | assureDirectoryExists(java.lang.String dirPath, ILog log)Make sure that the directory exists, creating it if necessary | 
| static void | copy(java.io.File src, java.io.File dst)Copies src file to dst file. | 
| static java.io.File | createTempDirectory(java.lang.String prefix, java.lang.String suffix, java.io.File parentDir) | 
| static boolean | deleteFileOrDirectory(java.io.File dir)Deletes all files and subdirectories under dir. | 
| static java.lang.String | getExtension(java.lang.String path) | 
| static java.io.File | getHashPath(java.lang.String dDocName, java.util.regex.Pattern dirHash)Return a directory path to the dDocName using the dirHash pattern. | 
| static void | moveFile(java.io.File source, java.io.File destination)Move the source file to the destination file | 
| static java.lang.String | readDirHashFile(java.io.File root)Read the dirHash Pattern in from the root directory. | 
| static void | renameFile(java.io.File fromFile, java.io.File toFile, boolean overwrite)Referenced from Content Server source; refer to intradoc.common.FileUtils#renameFileEx(java.lang.String, java.lang.String, int) | 
| static java.io.File | subtractRootPath(java.io.File rootPath, java.io.File fullPath)extract the part after the rootPath from the fullPath | 
| static boolean | validateFile(java.io.File file, boolean isDirectory)Validate a file before accessing. | 
| static void | writeDirHashFile(java.lang.String dirHash, java.io.File root)Write the string dirHash into a file "dirHash.txt" in the root directory if the text is null or blank, the file if present will be removed. | 
| 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 validateFile(java.io.File file,
                                   boolean isDirectory)
file - a reference to a physical fileisDirectory - if true, validate this is a directory; false validate this is a file
public static void copy(java.io.File src,
                        java.io.File dst)
                 throws java.io.IOException
src -dst -java.io.IOExceptionpublic static boolean deleteFileOrDirectory(java.io.File dir)
dir -
public static boolean assureDirectoryExists(java.lang.String dirPath,
                                            ILog log)
dirPath - directory pathlog - ILog reference if logging is desired, if not desired pass in null
public static boolean assureDirectoryExists(java.io.File dir,
                                            ILog log)
dir - directory pathlog - ILog reference if logging is desired, if not desired pass in null
public static java.io.File subtractRootPath(java.io.File rootPath,
                                            java.io.File fullPath)
rootPath - first part of path (ie: /scs/weblayout/)fullPath - full path (ie: /scs/weblayout/groups/public/documents/adhr/)public static java.lang.String getExtension(java.lang.String path)
public static java.io.File getHashPath(java.lang.String dDocName,
                                       java.util.regex.Pattern dirHash)
dDocName - Content Server's dDocNamedirHash - precompiled regular expression
public static void writeDirHashFile(java.lang.String dirHash,
                                    java.io.File root)
                             throws java.io.IOException
dirHash - text to write into the fileroot - directory where the "dirHash.txt" file is locatedjava.io.IOException
public static java.lang.String readDirHashFile(java.io.File root)
                                        throws java.io.IOException
root - directory where the "dirHash.txt" file is locatedjava.io.IOException
public static void moveFile(java.io.File source,
                            java.io.File destination)
                     throws java.io.IOException
source - the source filedestination - the destinationjava.io.IOException
public static void renameFile(java.io.File fromFile,
                              java.io.File toFile,
                              boolean overwrite)
                       throws java.io.IOException
fromFile - the source filetoFile - the destinationoverwrite - true to overwrite the destination if it existsjava.io.IOException
public static java.io.File createTempDirectory(java.lang.String prefix,
                                               java.lang.String suffix,
                                               java.io.File parentDir)
                                        throws java.io.IOException
java.io.IOException| 
 | Oracle® WebCenter Content Site Studio for External Applications Java API Reference 11g Release 1 (11.1.1) E17273-03 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||