2017 © Pedro Peláez
 

library tar

Tar / tar.gz writer. You can use it to work with large files without creating temporary files

image

andriell/tar

Tar / tar.gz writer. You can use it to work with large files without creating temporary files

  • Thursday, July 13, 2017
  • by andriell
  • Repository
  • 1 Watchers
  • 1 Stars
  • 308 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 26 % Grown

The README.md

php-tar

Tar / tar.gz writer. You can use it to work with large files without creating temporary files, (*1)

Example 1

Add a large file to standard output, (*2)

$echoWriter = new EchoWriter();
$tar = new Tar($echoWriter);
$tar->addBigFile('big_file.avi');
$tar->addBigFile('big_file2.avi', 'new/file/name.avi');
$tar->close();

Example 2

Write tar gz to file, (*3)

$stringWriter = new FileGzWriter(__DIR__ . '/test.tar.gz');
$tar = new Tar($stringWriter);
$tar->addFile('test1.txt', 'Test String 1');
$tar->addFile('test2.txt', 'Test String 2');
$tar->close();

Example 3

Write tar to file, (*4)

$stringWriter = new FileWriter(__DIR__ . '/test.tar');
$tar = new Tar($stringWriter);
$tar->addFile('test1.txt', 'Test String 1');
$tar->addFile('test2.txt', 'Test String 2');
$tar->close();

Example 4

Write tar gz to string, (*5)

$stringWriter = new StringGzWriter();
$tar = new Tar($stringWriter);
$tar->addFile('test1.txt', 'Test String 1');
$tar->addFile('test2.txt', 'Test String 2');
$tar->close();
$tarString = $stringWriter->getDate();

Example 5

Write tar to string, (*6)

$stringWriter = new StringWriter();
$tar = new Tar($stringWriter);
$tar->addFile('test1.txt', 'Test String 1');
$tar->addFile('test2.txt', 'Test String 2');
$tar->close();
$tarString = $stringWriter->getDate();

The Versions

13/07 2017

dev-master

9999999-dev https://github.com/andriell/php-tar

Tar / tar.gz writer. You can use it to work with large files without creating temporary files

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Andrey Rybalko

archive compression tar tar.gz

13/07 2017

v1.0.7

1.0.7.0 https://github.com/andriell/php-tar

Tar / tar.gz writer. You can use it to work with large files without creating temporary files

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Andrey Rybalko

archive compression tar tar.gz

12/07 2017

v1.0.6

1.0.6.0 https://github.com/andriell/php-tar

Simple tar writer

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Andrey Rybalko

archive tar