public final class ZipUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
unzip(String zipFilePath,
String unzipLocation,
boolean isAddToClasspath)
A method to unzip a zip file to given folder path.
|
static void |
zip(String sourceDirPath,
String zipFilePath)
A method to zip a folder with given path.
|
public static void zip(String sourceDirPath, String zipFilePath) throws IOException
Note: this zip method does not preserve permissions of files. eg: "execute" permissions.
sourceDirPath - src path to zipzipFilePath - created zip file pathIOException - error while creating the zip filepublic static void unzip(String zipFilePath, String unzipLocation, boolean isAddToClasspath) throws IOException
Note: this unzip method does not preserve permissions of files. eg: "execute" permissions.
zipFilePath - src path of the zipunzipLocation - the path zip should be extracted toisAddToClasspath - if the file is jar, whether add it to the CLI class pathIOException - error while unzipping the fileCopyright © 2021 WSO2. All rights reserved.