From fe842ecae2de4ceaf212b8c9118e52cc58a2c52f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Andr=C3=A9=20dos=20Santos=20Lopes?= Date: Sun, 29 Nov 2009 04:11:31 +0000 Subject: [PATCH] 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 --- reference/rar/functions/rar-comment-get.xml | 2 +- reference/rar/rarentry/isDirectory.xml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/reference/rar/functions/rar-comment-get.xml b/reference/rar/functions/rar-comment-get.xml index d9cf2d25a2..f26b638306 100644 --- a/reference/rar/functions/rar-comment-get.xml +++ b/reference/rar/functions/rar-comment-get.xml @@ -9,7 +9,7 @@ &reftitle.description; - RarEntryrar_comment_get + stringrar_comment_get resourcerar_file diff --git a/reference/rar/rarentry/isDirectory.xml b/reference/rar/rarentry/isDirectory.xml index 9a641986f8..fed2dc82a8 100644 --- a/reference/rar/rarentry/isDirectory.xml +++ b/reference/rar/rarentry/isDirectory.xml @@ -31,8 +31,8 @@ &reftitle.notes; 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): getAttr() & 0x10); +$isDirectory = (bool) ((($e->getHostOs() == RAR_HOST_WIN32) && ($e->getAttr() & 0x10)) && + (($e->getHostOs() == RAR_HOST_UNIX) && (($e->getAttr() & 0xf000) == 0x4000))); ]]>