note 99131 added to rarentry.extract
| From: | matthew at dps dot uk dot com | Date: | Thu, 29 Jul 2010 13:43:45 +0000 |
| Subject: | note 99131 added to rarentry.extract | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171205@lists.php.net to get a copy of this message | ||
I couldn't get the example of extracting files to work, had to change it to :-
$rar_file = rar_open($rarfile);
if ($rar_file === FALSE) die("Could not open RAR $rarfile archive.");
$list = rar_list($rar_file);
if ($list === FALSE) die("Could retrieve entries in RAR file $rarfile");
foreach($list as $entry) {
$xentry = rar_entry_get($rar_file, $entry->getName());
$xentry->extract($dest); // extract to the current dir
}
rar_close($rar_file);
Hope this helps
----
Server IP: 69.147.83.197
Probable Submitter: 86.16.185.203
----
Manual Page -- http://www.php.net/manual/en/rarentry.extract.php
Edit -- https://master.php.net/note/edit/99131
Del: integrated -- https://master.php.net/note/delete/99131/integrated
Del: useless -- https://master.php.net/note/delete/99131/useless
Del: bad code -- https://master.php.net/note/delete/99131/bad+code
Del: spam -- https://master.php.net/note/delete/99131/spam
Del: non-english -- https://master.php.net/note/delete/99131/non-english
Del: in docs -- https://master.php.net/note/delete/99131/in+docs
Del: other reasons-- https://master.php.net/note/delete/99131
Reject -- https://master.php.net/note/reject/99131
Search -- https://master.php.net/manage/user-notes.php