使用Groovy解压缩存档 [英] Unzip Archive with Groovy

查看:228
本文介绍了使用Groovy解压缩存档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Groovy有没有内置的支持来处理Zip文件(Groovy的方式)?



或者是否必须使用Java的java.util.zip.ZipFile处理Groovy中的Zip文件?

解决方案

AFAIK,没有一种原生的方式。但请查看这篇文章,了解如何添加 .zip(...)方法到File,这将非常接近您要查找的内容。您只需制作一个 .unzip(...)方法即可。


is there a built-in support in Groovy to handle Zip files (the groovy way)?

Or do i have to use Java's java.util.zip.ZipFile to process Zip files in Groovy ?

解决方案

AFAIK, there isn't a native way. But check out this article on how you'd add a .zip(...) method to File, which would be very close to what you're looking for. You'd just need to make an .unzip(...) method.

这篇关于使用Groovy解压缩存档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆