Skip to content

Instantly share code, notes, and snippets.

@ezhov-da
Last active March 10, 2019 12:23
Show Gist options
  • Save ezhov-da/aef13e51f00d203982ff20e44060720c to your computer and use it in GitHub Desktop.
Save ezhov-da/aef13e51f00d203982ff20e44060720c to your computer and use it in GitHub Desktop.
groovy распаковка zip
[code:]groovy[:code]
def zipFile = new java.util.zip.ZipFile(file)
zipFile.entries().findAll{it.name.endsWith('.jar')}.each {
def name = it.name
def fileJar = new File("${basicDerictoryForLoad}${name}")
println "Сохранили jar: ${fileJar}"
def is = zipFile.getInputStream(it)
fileJar.withOutputStream{out ->
out << is
}
}
[/code]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment