mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Made clear that calling rar_close invalidates RarEntry objects but not streams obtained through RarEntry::getstream.xml().
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@291105 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e54c27dd31
commit
0a82a13c66
2 changed files with 34 additions and 0 deletions
|
@ -39,6 +39,32 @@
|
|||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>2.0.0</entry>
|
||||
<entry>
|
||||
The Rar entries returned by <function>rar_entry_get</function>
|
||||
and <function>rar_list</function> are now invalidated when
|
||||
calling <function>rar_close</function>.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
supports read operations. This handler provides on-the-fly decompression
|
||||
for this entry.
|
||||
</para>
|
||||
<para>
|
||||
The handler is not invalidated by calling
|
||||
<function>rar_close</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
|
@ -49,6 +53,8 @@ if ($entry === false)
|
|||
$stream = $entry->getStream();
|
||||
if ($stream === false)
|
||||
die("Failed to obtain stream.");
|
||||
|
||||
rar_close($rar_file); //stream is independent from file
|
||||
|
||||
while (!feof($stream)) {
|
||||
$buff = fread($stream, 8192);
|
||||
|
@ -58,6 +64,8 @@ while (!feof($stream)) {
|
|||
break; //fread error
|
||||
}
|
||||
|
||||
fclose($stream);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue