bitandblack/unzip
最新稳定版本:0.1.0
Composer 安装命令:
composer require bitandblack/unzip
包简介
Unpacks ZIP content on the fly, without writing to the file system. Handles files, strings and ressources.
README 文档
README
Bit&Black Unzip
Unpacks ZIP content on the fly, without writing to the file system. Handles files, strings and ressources.
Installation
This library is made for the use with Composer. Add it to your project by running $ composer require bitandblack/unzip.
Usage
Using the auto ZIP handler
Maybe the easiest way is to use the AutoZIPHandler. It detects the kind of ZIP content by its own and returns a FileType, StringType or StreamType object.
<?php
use BitAndBlack\Unzip\AutoZIPHandler;
$zipContent = AutoZIPHandler::create($whateverZIPContent);
Call getContents() to see what is inside the ZIP.
The ZIP content can be extracted to the file system by calling extractTo().
Manual set up
You can set up the file type by your own too. For example:
<?php
use BitAndBlack\Unzip\Type\FileType;
$fileType = new FileType('/path/to/file.zip');
$contents = $fileType->getContents();
Help
If you have questions feel free to contact us under hello@bitandblack.com.
统计信息
- 总下载量: 258
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-03-22