dir

(PHP 3, PHP 4 )

dir -- directory class

Popis

new dir (string directory)

Pseudo-objektov∞ orientovan² mechanismus pro Φtenφ adresß°e. Otev°e zadan² directory. Po otev°enφ adresß°e jsou p°φstupnΘ dv∞ vlastnosti. Vlastnost handle je pou╛itelnß s jin²mi adresß°ov²mi funkcemi jako readdir(), rewinddir() a closedir(). Hodnotou vlastnosti path je cesta k otev°enΘmu adresß°i. Dßle jsou p°φstupnΘ t°i metody: read, rewind a close.

P°φklad 1. Dir() p°φklad

$d = dir("/etc");
echo "Handle: ".$d->handle."<br>\n";
echo "Path: ".$d->path."<br>\n";
while($entry=$d->read()) {
    echo $entry."<br>\n";
}
$d->close();