array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'rarentry.isdirectory.php', 1 => 'RarEntry::isDirectory', ), 'up' => array ( 0 => 'class.rarentry.php', 1 => 'RarEntry', ), 'prev' => array ( 0 => 'rarentry.getversion.php', 1 => 'RarEntry::getVersion', ), 'next' => array ( 0 => 'rarentry.isencrypted.php', 1 => 'RarEntry::isEncrypted', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/rar/rarentry/isdirectory.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL rar >= 2.0.0)
RarEntry::isDirectory — Test whether an entry represents a directory
Esta função não possui parâmetros.
This function is only available starting with version 2.0.0, but one can 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):
<?php
//...
//Open file, get entry and store in variable $e...
//...
$isDirectory = (bool) ((($e->getHostOs() == RAR_HOST_WIN32) && ($e->getAttr() & 0x10)) ||
(($e->getHostOs() == RAR_HOST_UNIX) && (($e->getAttr() & 0xf000) == 0x4000)));
?>