php-src/ext/spl/examples/directorytree.php
2003-11-18 22:18:38 +00:00

18 lines
332 B
PHP
Executable File

<?php
/** tree view example
*
* Usage: php DirectoryTree.php <path>
*
* Simply specify the path to tree with parameter <path>.
*
* (c) Marcus Boerger
*/
$length = $argc > 3 ? $argv[3] : NULL;
foreach(new LimitIterator(new DirectoryTreeIterator($argv[1]), @$argv[2], $length) as $pathname => $file) {
echo "$file\n";
}
?>