00001 <?php
00002
00015 if ($argc < 3) {
00016 echo <<<EOF
00017 Usage: php findregex.php <file> <name>
00018
00019 Find a specific file by name.
00020
00021 <path> Path to search in.
00022 <name> Regex for filenames to look for.
00023
00024
00025 EOF;
00026 exit(1);
00027 }
00028
00029 if (!class_exists("RegexFindFile", false)) require_once("regexfindfile.inc");
00030
00031 foreach(new RegexFindFile($argv[1], $argv[2]) as $file)
00032 {
00033 echo $file->getPathname()."\n";
00034 }
00035
00036 ?>