downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

RarEntry::isEncrypted> <RarEntry::getVersion
[edit] Last updated: Fri, 17 May 2013

view this page in

RarEntry::isDirectory

(PECL rar >= 2.0.0)

RarEntry::isDirectoryTeste si l'entrée courante est un dossier

Description

public bool RarEntry::isDirectory ( void )

Teste si l'entrée courante est un dossier.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Retourne TRUE si l'entrée est un dossier, FALSE sinon.

Notes

Cette fonction est uniquement disponible depuis la version 2.0.0, mais ce test peut également être effectué en vérifiant les attributs de l'entrée comme ceci (ne fonctionne que pour des fichiers compressés avec RAR sous Windows ou Unix) :

<?php
//...
// Ouvre le fichier, récupère l'entrée et la stock dans la variable $e...
//...

$isDirectory = (bool) ((($e->getHostOs() == RAR_HOST_WIN32) && ($e->getAttr() & 0x10)) ||
    ((
$e->getHostOs() == RAR_HOST_UNIX) && (($e->getAttr() & 0xf000) == 0x4000)));
?>



add a note add a note User Contributed Notes RarEntry::isDirectory - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites