Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 20713 программистов и 1134 робота. Сейчас ищут 369 программистов ...
Приступая к работе

RarEntry::isDirectory - Test whether an entry represents a directory

Вернуться к: RarEntry

RarEntry::isDirectory

(PECL rar >= 2.0.0)

RarEntry::isDirectoryTest whether an entry represents a directory

Описание

public bool RarEntry::isDirectory ( void )

Tests whether the current entry is a directory.

Список параметров

У этой функции нет параметров.

Возвращаемые значения

Returns TRUE if this entry is a directory and FALSE otherwise.

Примечания

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)));
?>



Вернуться к: RarEntry

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware