SPL-StandardPHPLibrary
findfile.php
Go to the documentation of this file.
1 <?php
2 
16 if ($argc < 3) {
17  echo <<<EOF
18 Usage: php findfile.php <path> <name>
19 
20 Find a specific file by name.
21 
22 <path> Path to search in.
23 <name> Filename to look for.
24 
25 
26 EOF;
27  exit(1);
28 }
29 
30 if (!class_exists("FindFile", false)) require_once("findfile.inc");
31 
32 foreach(new FindFile($argv[1], $argv[2]) as $file) echo $file->getPathname()."\n";
33 ?>
Base class to find files.
Definition: findfile.inc:21