summaryrefslogtreecommitdiff
path: root/ext/spl/examples/directorytree.php
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-12-04 19:39:46 +0000
committerMarcus Boerger <helly@php.net>2003-12-04 19:39:46 +0000
commitf679b5c935f713854a14f00370d4d832a4850b56 (patch)
tree2be7a10dbb7a38db90411d8c67f7c799023ca3ad /ext/spl/examples/directorytree.php
parent2216eb4511c20fd0315c7217d90027b32255b2f4 (diff)
downloadphp-git-f679b5c935f713854a14f00370d4d832a4850b56.tar.gz
Update documentation
Diffstat (limited to 'ext/spl/examples/directorytree.php')
-rwxr-xr-xext/spl/examples/directorytree.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/ext/spl/examples/directorytree.php b/ext/spl/examples/directorytree.php
index e22244a9e1..31af2495a7 100755
--- a/ext/spl/examples/directorytree.php
+++ b/ext/spl/examples/directorytree.php
@@ -2,13 +2,26 @@
/** tree view example
*
- * Usage: php DirectoryTree.php <path>
+ * Usage: php directorytree.php <path> [<start> [<count>]]
*
* Simply specify the path to tree with parameter <path>.
*
- * (c) Marcus Boerger
+ * (c) Marcus Boerger, 2003
*/
+if ($argc < 2) {
+ echo <<<EOF
+Usage: php ${_SERVER['PHP_SELF']} <path>
+
+Displays a graphical directory tree for the given <path>.
+
+<path> The directory for which to generate the directory tree graph.
+
+
+EOF;
+ exit(1);
+}
+
$length = $argc > 3 ? $argv[3] : NULL;
foreach(new LimitIterator(new DirectoryTreeIterator($argv[1]), @$argv[2], $length) as $file) {