Skip to content

taskphp/archive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

task/archive

Build Status Coverage Status

Example

use Task\Plugin\FilesystemPlugin;
use Task\Plugin\ArchivePlugin;
use Task\Plugin\Archive\Archive;

$project->inject(function ($container) {
    $container['fs'] = new FilesystemPlugin;
    $container['archive'] = new ArchivePlugin;
});

$project->addTask('archive', ['fs', 'archive', function ($fs, $archive) {
    $source = 'path/to/directory';
    $target = 'path/to/archive.tar.gz';

    $fs->ls($source)
        ->pipe($archive->create(Archive::TAR, Archive::GZ))
        ->pipe($fs->touch($target));
}]);

Installation

Add to your composer.json:

...
"require-dev": {
    "task/archive": "~0.1"
}
...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages