| Constructor and Description |
|---|
Zips() |
| Modifier and Type | Method and Description |
|---|---|
static int |
packJar(Path source,
Path targetJar,
boolean preserveRoot)
Zip the given
source file or folder in the targetJar Jar
file. |
static int |
packZip(Path source,
Path targetZip,
boolean preserveRoot)
Zip the given
source file or folder in the targetZip Zip
file. |
static int |
unpackJar(Path source,
Path outputDir)
Unzip the given
source Jar file in the outputDir. |
static int |
unpackTarGz(Path sourcePath,
Path outputDir) |
static int |
unpackZip(Path source,
Path outputDir)
Unzip the given
source Zip file in the outputDir. |
public static int unpackZip(Path source, Path outputDir) throws IOException
source Zip file in the outputDir.source - the file to unzip.outputDir - the output directory where the Zip will be unpacked.IOExceptionpublic static int unpackJar(Path source, Path outputDir) throws IOException
source Jar file in the outputDir.source - the file to unzip.outputDir - the output directory where the Jar will be unpacked. It does
not have to exist beforehand.IOExceptionpublic static int unpackTarGz(Path sourcePath, Path outputDir) throws IOException
IOExceptionpublic static int packZip(Path source, Path targetZip, boolean preserveRoot) throws IOException
source file or folder in the targetZip Zip
file. If preserveRoot is set to true, the output Zip will contain the
folder and its contents, only its contents otherwise.source - the folder to zip.targetZip - the Zip file to create or overwrite.preserveRoot - whether the source folder should be kept in the
target Zip.IOExceptionpublic static int packJar(Path source, Path targetJar, boolean preserveRoot) throws IOException
source file or folder in the targetJar Jar
file. If preserveRoot is set to true, the output Zip will contain the
folder and its contents, only its contents otherwise.source - the folder to zip.targetJar - the Jar file to create or overwrite.preserveRoot - whether the source folder should be kept in the
target Jar.IOExceptionCopyright © 2023 Eclipse Foundation. All rights reserved.