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.IOException
public 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.IOException
public static int unpackTarGz(Path sourcePath, Path outputDir) throws IOException
IOException
public 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.IOException
public 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.IOException
Copyright © 2017 Eclipse Foundation. All rights reserved.