Last active
March 10, 2019 12:23
-
-
Save ezhov-da/aef13e51f00d203982ff20e44060720c to your computer and use it in GitHub Desktop.
groovy распаковка zip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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