public class FileUtil extends Object
| Constructor and Description |
|---|
FileUtil() |
| Modifier and Type | Method and Description |
|---|---|
void |
copyFiles(String sourcePath,
String destinationPath)
Copy files.
|
void |
createZip(String destinationZipFile)
Generate the zip file.
|
void |
deleteDirectory(String dirPath)
Delete temporary created directory.
|
void |
generateFileList(File srcFolder)
Traverse a directory and get all files,
and add the file into fileList
|
void |
zipFiles(Path srcFolder,
String destinationZipFile)
Zip files in a given directory.
|
public void deleteDirectory(String dirPath) throws IOException
dirPath - IOExceptionpublic void copyFiles(String sourcePath, String destinationPath) throws IOException
sourcePath - destinationPath - IOExceptionpublic void zipFiles(Path srcFolder, String destinationZipFile) throws IOException
srcFolder - destinationZipFile - IOExceptionpublic void createZip(String destinationZipFile) throws IOException
destinationZipFile - IOExceptionpublic void generateFileList(File srcFolder)
srcFolder - file or directoryCopyright © 2018 WSO2. All rights reserved.