承接 popphp/pop-archive 相关项目开发

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

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

popphp/pop-archive

最新稳定版本:2.1.1p1

Composer 安装命令:

composer require popphp/pop-archive

包简介

Pop Archive Component for PHP Framework

README 文档

README

END OF LIFE

The pop-archive component v2.1.1 is now end-of-life and will no longer be maintained.

Build Status Coverage Status

OVERVIEW

pop-archive provides a normalized interface and integrated adapters to let a user decompress, extract, package and compress files in a common archive format. The supported formats are:

  • tar
  • tar.gz
  • tar.bz2
  • zip

pop-archive is a component of the Pop PHP Framework.

INSTALL

Install pop-archive using Composer.

composer require popphp/pop-archive

BASIC USAGE

Extract a zip archive

$archive = new Pop\Archive\Archive('test.zip');
$archive->extract('/path/to/extract/files');

Extract a tar.gz archive

// It will auto-detect and automatically decompress a compressed TAR file
$archive = new Pop\Archive\Archive('test.tar.gz');
$archive->extract('/path/to/extract/files');

Add files to a zip archive

$archive = new Pop\Archive\Archive('test.zip');
$archive->addFiles('/path/to/single/file.txt');
$archive->addFiles([
    '/path/to/multiple/files1.txt',
    '/path/to/multiple/files2.txt',
    '/path/to/multiple/files3.txt',
]);

Add files to a tar archive and compress

$archive = new Pop\Archive\Archive('test.tar');
$archive->addFiles('/path/to/folder/of/files');

// Creates the compressed archive file 'test.tar.bz2'
$archive->compress('bz2');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: New
  • 更新时间: 2014-12-07