xp-framework/zip
最新稳定版本:v11.3.2
Composer 安装命令:
composer require xp-framework/zip
包简介
ZIP File support for the XP Framework
README 文档
README
Usage (creating a zip file)
use io\archive\zip\{ZipFile, ZipDirEntry, ZipFileEntry}; use io\File; $z= ZipFile::create(new File('dist.zip')); // Add a directory $dir= $z->add(new ZipDirEntry('META-INF')); // Add a file $file= $z->add(new ZipFileEntry($dir, 'version.txt')); $file->out()->write($contents); // Close $z->close();
Usage (reading a zip file)
use io\archive\zip\ZipFile; use io\streams\Streams; use io\File; $z= ZipFile::open(new File('dist.zip')); foreach ($z->entries() as $entry) { if ($entry->isDirectory()) { // Create dir } else { // Extract Streams::readAll($entry->in()); } }
统计信息
- 总下载量: 61k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-01-10

