[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] svn: /phpdoc/en/trunk/reference/rar/ functions/rar-comment-get.xml rarentry/isDirectory.xm
From: Gustavo_André_dos_Santos_Lopes <cataphract () php ! net>
Date: 2009-11-29 4:11:31
Message-ID: svn-cataphract-1259467891-291412-604543586 () svn ! php ! net
[Download RAW message or body]
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>
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic