azjezz / tarry
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:Hack
pkg:composer/azjezz/tarry
Requires
- hhvm: ^4.113.0
 
Requires (Dev)
- hhvm/hhast: ^4.113.0
 - hhvm/hhvm-autoload: ^3.2.0
 
README
Tarry is a small utility for building TAR archives.
Installation
This package is available via composer:
composer require azjezz/tarry
Features
Supported
- ability to create a TAR archive.
 - GZIP compression
 - BZIP compression
 - adding files
 - modifying file permissions, user id, group id, and mtime.
 
TODO
- add support for long filenames.
 - extracting existing archives.
 - modifying existing archives
 - more?
 
Usage
use namespace Tarry; use namespace HH\Lib\File; async function main(): Awaitable<void> { $archive = Tarry\ArchiveBuilder::create() ->withCompressionAlgorithm(CompressionAlgorithm::GZIP) ->withCompressionLevel(9) ->withNode(shape( 'filename' => 'hello-world.txt', 'content' => 'Hello, World!', )) ->build(); await $archive->saveToFile('hello-world.tar.gz'); }
License
The MIT License (MIT). Please see LICENSE for more information.