1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 01:32:22 +01:00
Files
archived-php-src/ext/spl/examples/directorytree.php
Marcus Boerger 3d9ec63384 Update examples
2003-11-22 20:51:15 +00:00

18 lines
321 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 $file) {
echo $file ."\n";
}
?>