takuya / unar-wrapper
php wrapper of UnArchiver commad line tool.
0.1
2021-03-02 10:02 UTC
Requires
- ext-json: *
- takuya/process: ^1.3
Requires (Dev)
- ext-json: *
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-11-29 06:29:01 UTC
README
Unarchive command line tools wrapper
no compress, only for extract. but many formats can use.
Why this package written.
To deal in same way several archive formats ( zip/tar/rar ).
support formats.
depends on unar
( Unarvhive command line tool ).
zip / rar(winrar) / tar.gz works fine.
Installing
composer require takuya/php-unar-wrapper
How to use
<?php require_once 'vendor/autoload.php'; use SystemUtil\Archiver\UnArchiver; $sample_zip = 'sample.zip'; $ar = new UnArchiver(); $ar->open($sample_zip); foreach( $ar->list('*.jpg') as $name => $entry ){ var_dump([$name,$entry->contents()]); } ?>
requirement
UnArchiver commad line tools.
sudo apt install unar
More samples.
See samples/ in repositry.