00001 <?php
00002
00014
00015
00016
00017
00018 if ($argc < 2) {
00019 echo <<<EOF
00020 Usage: php ${_SERVER['PHP_SELF']} <path>
00021
00022 Displays a graphical tree for the given <path>.
00023
00024 <path> The directory for which to generate the tree graph.
00025
00026
00027 EOF;
00028 exit(1);
00029 }
00030
00031 if (!class_exists("DirectoryTreeIterator", false)) require_once("directorytreeiterator.inc");
00032 if (!class_exists("DirectoryGraphIterator", false)) require_once("directorygraphiterator.inc");
00033
00034 echo $argv[1]."\n";
00035 foreach(new DirectoryGraphIterator($argv[1]) as $file)
00036 {
00037 echo $file . "\n";
00038 }
00039
00040 ?>