svn: /phpdoc/en/trunk/reference/rar/ functions/rar-comment-get.xml rarentry/isDirectory.xml
| From: | Gustavo André dos Santos Lopes | Date: | Sun, 29 Nov 2009 04:11:31 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/rar/ functions/rar-comment-get.xml rarentry/isDirectory.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-5586@lists.php.net to get a copy of this message | ||
cataphract Sun, 29 Nov 2009 04:11:31 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=291412
Log:
Fixed example and return type of rar_comment_get
Changed paths:
U phpdoc/en/trunk/reference/rar/functions/rar-comment-get.xml
U phpdoc/en/trunk/reference/rar/rarentry/isDirectory.xml
Modified: phpdoc/en/trunk/reference/rar/functions/rar-comment-get.xml
===================================================================
--- phpdoc/en/trunk/reference/rar/functions/rar-comment-get.xml 2009-11-29 03:41:11 UTC (rev 291411)
+++ phpdoc/en/trunk/reference/rar/functions/rar-comment-get.xml 2009-11-29 04:11:31 UTC (rev 291412)
@@ -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>
Modified: phpdoc/en/trunk/reference/rar/rarentry/isDirectory.xml
===================================================================
--- phpdoc/en/trunk/reference/rar/rarentry/isDirectory.xml 2009-11-29 03:41:11 UTC (rev 291411)
+++ phpdoc/en/trunk/reference/rar/rarentry/isDirectory.xml 2009-11-29 04:11:31 UTC (rev 291412)
@@ -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>