| java.lang.Object com.bostechcorp.cbesb.runtime.file.FileOperator
FileOperator | public class FileOperator (Code) | | The file operation class.
author: j.zhang version: 1.0.0 |
Method Summary | |
public static void | archiveFile(File file, String archivePath, String archiveFilePattern, int count) Archive the specified file. | public static void | copyFile(File oldFile, String newPath) Copy the file to another folder and the new filename must be specificed. | public static void | createFolder(String folderPath) Create the specificed folder. | public static boolean | deleteFile(File file) Delete the specificed file.
Parameters: path - This is the full file path and filename. | public static void | moveFile(File oldFile, String folderName) Move the file to another folder. | public static File[] | scanDir(String dirName) Scan the folder for all files.
Parameters: dirName - The folder name. | public static void | scanStageDir(String stageDir, String holdDir, String sourceDir, boolean isHold) Scan the stage directory to check if any files are present in it.
Parameters: stageDir - The stageDir name. Parameters: holdDir - The holdDir name. Parameters: sourceDir - The sourceDir name. Parameters: isHold - Boolean value. |
archiveFile | public static void archiveFile(File file, String archivePath, String archiveFilePattern, int count)(Code) | | Archive the specified file.
Parameters: filePath - The file path and filename. Parameters: archivePath - The archive location to place file. Parameters: archiveFilePattern - Describes a file pattern to user to rename the file when being archived. Parameters: count - An automatically incremented value that starts from 1 when the component is started. |
copyFile | public static void copyFile(File oldFile, String newPath)(Code) | | Copy the file to another folder and the new filename must be specificed.
Parameters: oldFile - The old file. Parameters: newPath - The new file path that is folder name. |
createFolder | public static void createFolder(String folderPath)(Code) | | Create the specificed folder.
Parameters: folderPath - The folder name and full path. |
deleteFile | public static boolean deleteFile(File file)(Code) | | Delete the specificed file.
Parameters: path - This is the full file path and filename. The delete flag: true is successful; false is unsuccessful. |
moveFile | public static void moveFile(File oldFile, String folderName)(Code) | | Move the file to another folder.
Parameters: oldPath - The old file. Parameters: folderName - The file path that is folder name. |
scanDir | public static File[] scanDir(String dirName)(Code) | | Scan the folder for all files.
Parameters: dirName - The folder name. All of the files in the folder. |
scanStageDir | public static void scanStageDir(String stageDir, String holdDir, String sourceDir, boolean isHold)(Code) | | Scan the stage directory to check if any files are present in it.
Parameters: stageDir - The stageDir name. Parameters: holdDir - The holdDir name. Parameters: sourceDir - The sourceDir name. Parameters: isHold - Boolean value. |
|
|