diff options
author | Anika Henke <anika@selfthinker.org> | 2015-07-25 23:13:18 +0100 |
---|---|---|
committer | Anika Henke <anika@selfthinker.org> | 2015-07-25 23:13:18 +0100 |
commit | 0bfc8d5a03c495c3436780901fe59341faee4d9e (patch) | |
tree | 5fe7a6e2e087880647a748b1fbd53ca66aafd943 /vendor/splitbrain/php-archive/README.md | |
parent | cf2c8e759bf06596f9492d090f4dd8dbb76a178c (diff) | |
parent | 6cb9974651aef2a41b48fcb922cc6baa18a0660f (diff) | |
download | rpg-0bfc8d5a03c495c3436780901fe59341faee4d9e.tar.gz rpg-0bfc8d5a03c495c3436780901fe59341faee4d9e.tar.bz2 |
Merge remote-tracking branch 'origin/master' into styler
Conflicts:
lib/exe/css.php
Diffstat (limited to 'vendor/splitbrain/php-archive/README.md')
-rw-r--r-- | vendor/splitbrain/php-archive/README.md | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/vendor/splitbrain/php-archive/README.md b/vendor/splitbrain/php-archive/README.md index 4fb673259..6c5780a7a 100644 --- a/vendor/splitbrain/php-archive/README.md +++ b/vendor/splitbrain/php-archive/README.md @@ -18,24 +18,29 @@ Use composer: 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 +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 ```php +require_once 'vendor/autoload.php'; use splitbrain\PHPArchive\Tar; -// To list the contents of an existing TAR archive, open() it and use contents() on it: +// To list the contents of an existing TAR archive, open() it and use +// contents() on it: $tar = new Tar(); $tar->open('myfile.tgz'); $toc = $tar->contents(); print_r($toc); // array of FileInfo objects -// To extract the contents of an existing TAR archive, open() it and use extract() on it: +// To extract the contents of an existing TAR archive, open() it and use +// extract() on it: $tar = new Tar(); $tar->open('myfile.tgz'); $tar->extract('/tmp'); -// To create a new TAR archive directly on the filesystem (low memory requirements), create() it, +// To create a new TAR archive directly on the filesystem (low memory +// requirements), create() it: $tar = new Tar(); $tar->create('myfile.tgz'); $tar->addFile(...); @@ -43,8 +48,8 @@ $tar->addData(...); ... $tar->close(); -// To create a TAR archive directly in memory, create() it, add*() files and then either save() -// or getData() it: +// To create a TAR archive directly in memory, create() it, add*() +// files and then either save() or getArchive() it: $tar = new Tar(); $tar->create(); $tar->addFile(...); @@ -54,8 +59,8 @@ $tar->save('myfile.tgz'); // compresses and saves it echo $tar->getArchive(Archive::COMPRESS_GZIP); // 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()``` functions. +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 |