加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

如何使用Perl的Archive :: Zip从ZIP存档中提取单个文件?

发布时间:2020-12-15 21:47:10 所属栏目:大数据 来源:网络整理
导读:我有一个zip文件X,我想提取一个文件,位于x / x / x / file.txt.如何使用 Archive::Zip 和Perl执行此操作? 解决方法 您可以使用extractMember方法: extractMember( $memberOrName [,$extractedName ] ) Extract the given member,or match its name and ext
我有一个zip文件X,我想提取一个文件,位于x / x / x / file.txt.如何使用 Archive::Zip和Perl执行此操作?

解决方法

您可以使用extractMember方法:

extractMember( $memberOrName [,$extractedName ] )

Extract the given member,or match its name and extract it. Returns undef if member doesn’t exist in this Zip. If optional second arg is given,use it as the name of the extracted member. Otherwise,the internal filename of the member is used as the name of the extracted file or directory. If you pass $extractedName,it should be in the local file system’s format. All necessary directories will be created. Returns AZ_OK on success.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读