Package io.bdeploy.common.util
Class ZipHelper
java.lang.Object
io.bdeploy.common.util.ZipHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanDetermines wheter a given URI points to a ZIP file.static voidUnzip single ZIP filestatic voidzip(OutputStream output, Path source) Creates a ZIP stream from the given source directory.static voidCreates a ZIP file from the given source directory.
-
Method Details
-
isZipUri
Determines wheter a given URI points to a ZIP file. -
zip
Creates a ZIP file from the given source directory. The targets parent directory must exist.In contrast to Java's built-in ZIP
FileSystem, this will determine whether files should be executable and mark them accordingly, even when run on windows.- Parameters:
zipFile- the ZIP file to createsource- the source directory
-
zip
Creates a ZIP stream from the given source directory.In contrast to Java's built-in ZIP
FileSystem, this will determine whether files should be executable and mark them accordingly, even when run on windows.- Parameters:
output- the stream to write to.source- the source directory
-
unzip
Unzip single ZIP file
-