public class ZipFileSystems
extends java.lang.Object
| Constructor and Description |
|---|
ZipFileSystems() |
| Modifier and Type | Method and Description |
|---|---|
static java.net.URI |
createZipUri(java.nio.file.Path path)
Converts a path to a
jar:file: URI. |
static void |
process(java.io.File zipFile,
java.lang.String xMessage,
groovy.lang.Closure<java.lang.Void> closure)
Applies the parameter closure to the parameter zip file.
|
static java.nio.file.FileSystem |
unzip(java.io.File zipFile)
Unzips a zip file and returns a zip file system object.
|
static java.nio.file.FileSystem |
unzip(java.nio.file.Path zipPath)
Expands the parameter archive.
|
static java.nio.file.FileSystem |
unzip(java.net.URI uri)
Expands the parameter archive.
|
public static java.nio.file.FileSystem unzip(java.io.File zipFile)
throws java.io.IOException
zipFile - The zip file to openjava.io.IOException - If unable to open the parameter zip filepublic static java.nio.file.FileSystem unzip(java.nio.file.Path zipPath)
throws java.io.IOException
zipPath - The path to the archive to expand.java.io.IOException - If unable to expand the archive.public static java.net.URI createZipUri(java.nio.file.Path path)
jar:file: URI.path - The path to convert.jar:file: URI for the parameter path.public static java.nio.file.FileSystem unzip(java.net.URI uri)
throws java.io.IOException
uri - The URI identifying the archive to expand.java.io.IOException - If unable to expand the archive.public static void process(java.io.File zipFile,
java.lang.String xMessage,
groovy.lang.Closure<java.lang.Void> closure)
zipFile - The zip file to processxMessage - A message to include when wrapping an exception thrown during processingclosure - The processing closure to apply to the parameter zip fileorg.gradle.api.GradleException - If unable to apply the closure to the zip file