|
eio_readdir(PECL eio >= 0.0.1dev) eio_readdir — Reads through a whole directory Описание
resource eio_readdir
( string $path
, int $flags
, int $pri
, callback $callback
[, string $data = NULL
] )
Reads through a whole directory(via the opendir, readdir and closedir system calls) and returns either the names or an array in result argument of callback function, depending on the flags argument. Список параметров
Возвращаемые значенияeio_readdir() returns request resource on success, or FALSE on error. Sets result argument of callback function according to flags:
Node types:
ПримерыПример #1 eio_readdir() example
<?php Результатом выполнения данного примера будет что-то подобное: my_readdir_callback called data: NULL result: array(2) { ["names"]=> array(7) { [0]=> string(7) "archive" [1]=> string(8) "articles" [2]=> string(8) "incoming" [3]=> string(7) "innfeed" [4]=> string(8) "outgoing" [5]=> string(8) "overview" [6]=> string(3) "tmp" } ["dents"]=> array(7) { [0]=> array(3) { ["name"]=> string(7) "archive" ["type"]=> int(4) ["inode"]=> int(393265) } [1]=> array(3) { ["name"]=> string(8) "articles" ["type"]=> int(4) ["inode"]=> int(393266) } [2]=> array(3) { ["name"]=> string(8) "incoming" ["type"]=> int(4) ["inode"]=> int(393267) } [3]=> array(3) { ["name"]=> string(7) "innfeed" ["type"]=> int(4) ["inode"]=> int(393269) } [4]=> array(3) { ["name"]=> string(8) "outgoing" ["type"]=> int(4) ["inode"]=> int(393270) } [5]=> array(3) { ["name"]=> string(8) "overview" ["type"]=> int(4) ["inode"]=> int(393271) } [6]=> array(3) { ["name"]=> string(3) "tmp" ["type"]=> int(4) ["inode"]=> int(393272) } } } |
|