承接 cosmin-ciolacu/zipper 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cosmin-ciolacu/zipper

最新稳定版本:1.0.0

Composer 安装命令:

composer require cosmin-ciolacu/zipper

包简介

A simple zip utility for creating zip files and extracting items to a specific path

README 文档

README

A simple tool to zip and unzip files. It is a wrapper around the ZipArchive class in PHP.

Requirements

  • PHP 7.4 or higher
  • PHP Zip extension

Installation

composer require cosmin-ciolacu/zipper

Usage

use CosminCiolacu\Zipper\Zipper;

// create zip with files
$zipPath = 'path/to/zip.zip';
$files = ['path/to/file1.txt', 'path/to/file2.txt'];

Zipper::createZip($zipPath, $files);

// unzip
$unzipPath = 'path/to/unzip';
Zipper::unzip($zipPath, $unzipPath);

if the zip path is not found, it will throw FailedToOpenZipFileException.

use CosminCiolacu\Zipper\Exceptions\FailedToOpenZipFileException;

try {
    Zipper::unzip('path/to/zip.zip', 'path/to/unzip');
} catch (FailedToOpenZipFileException $e) {
    echo $e->getMessage();
}

License

The MIT License (MIT). Please see License File for more information.

Testing

./vendor/bin/pest

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-19