mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fixed example and return type of rar_comment_get
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@291412 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
cc25cf0bca
commit
fe842ecae2
2 changed files with 5 additions and 4 deletions
|
@ -9,7 +9,7 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>RarEntry</type><methodname>rar_comment_get</methodname>
|
||||
<type>string</type><methodname>rar_comment_get</methodname>
|
||||
<methodparam><type>resource</type><parameter>rar_file</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
&reftitle.notes;
|
||||
<para>
|
||||
This function is only available starting with version 2.0.0, but one can
|
||||
also test whether an entry is a directory by checking if the bit 0x10 is set
|
||||
in the entry attributes, like this:
|
||||
also test whether an entry is a directory by checking the entry attributes,
|
||||
like this (only works for files compressed in Rar for Windows or Unix):
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
@ -40,7 +40,8 @@
|
|||
//Open file, get entry and store in variable $e...
|
||||
//...
|
||||
|
||||
$isDirectory = (bool) ($e->getAttr() & 0x10);
|
||||
$isDirectory = (bool) ((($e->getHostOs() == RAR_HOST_WIN32) && ($e->getAttr() & 0x10)) &&
|
||||
(($e->getHostOs() == RAR_HOST_UNIX) && (($e->getAttr() & 0xf000) == 0x4000)));
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue