Lines Matching full:tar
1 PHPArchive - Pure PHP ZIP and TAR handling
4 This library allows to handle new ZIP and TAR archives without the need for any special PHP extensions (gz and bzip are
19 The usage for the Zip and Tar classes are basically the same. Here are some
28 use splitbrain\PHPArchive\Tar;
30 // To list the contents of an existing TAR archive, open() it and use
32 $tar = new Tar();
33 $tar->open('myfile.tgz');
34 $toc = $tar->contents();
37 // To extract the contents of an existing TAR archive, open() it and use
39 $tar = new Tar();
40 $tar->open('myfile.tgz');
41 $tar->extract('/tmp');
43 // To create a new TAR archive directly on the filesystem (low memory
45 $tar = new Tar();
46 $tar->create('myfile.tgz');
47 $tar->addFile(...);
48 $tar->addData(...);
50 $tar->close();
52 // To create a TAR archive directly in memory, create() it, add*()
54 $tar = new Tar();
55 $tar->setCompression(9, Archive::COMPRESS_BZIP);
56 $tar->create();
57 $tar->addFile(...);
58 $tar->addData(...);
60 $tar->save('myfile.tbz'); // compresses and saves it
61 echo $tar->getArchive(); // compresses and returns it
64 Differences between Tar and Zip: Tars are compressed as a whole, while Zips compress each file individually. Therefore