summaryrefslogtreecommitdiff
path: root/vendor/splitbrain/php-archive/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/splitbrain/php-archive/README.md')
-rw-r--r--vendor/splitbrain/php-archive/README.md14
1 files changed, 9 insertions, 5 deletions
diff --git a/vendor/splitbrain/php-archive/README.md b/vendor/splitbrain/php-archive/README.md
index 6c5780a7a..f18764b61 100644
--- a/vendor/splitbrain/php-archive/README.md
+++ b/vendor/splitbrain/php-archive/README.md
@@ -19,8 +19,11 @@ Usage
-----
The usage for the Zip and Tar classes are basically the same. Here are some
-examples for working with TARs to get you started. Check the source code
-comments for more info
+examples for working with TARs to get you started.
+
+Check the [API docs](https://splitbrain.github.io/php-archive/) for more
+info.
+
```php
require_once 'vendor/autoload.php';
@@ -51,16 +54,17 @@ $tar->close();
// To create a TAR archive directly in memory, create() it, add*()
// files and then either save() or getArchive() it:
$tar = new Tar();
+$tar->setCompression(9, Archive::COMPRESS_BZIP);
$tar->create();
$tar->addFile(...);
$tar->addData(...);
...
-$tar->save('myfile.tgz'); // compresses and saves it
-echo $tar->getArchive(Archive::COMPRESS_GZIP); // compresses and returns it
+$tar->save('myfile.tbz'); // compresses and saves it
+echo $tar->getArchive(); // compresses and returns it
```
Differences between Tar and Zip: Tars are compressed as a whole, while Zips compress each file individually. Therefore
you can call ```setCompression``` before each ```addFile()``` and ```addData()``` function call.
The FileInfo class can be used to specify additional info like ownership or permissions when adding a file to
-an archive. \ No newline at end of file
+an archive.