mirror of
https://github.com/php/php-src.git
synced 2024-10-10 11:12:08 +00:00
e058626c66
# The initial idea came from a request by Sebastian
29 lines
527 B
PHP
Executable File
29 lines
527 B
PHP
Executable File
<?php
|
|
|
|
/** Find a specific file by name.
|
|
*
|
|
* Usage: php findfile.php <path> <name>
|
|
*
|
|
* <path> Path to search in. You can specify multiple paths by separating
|
|
* them with ';'.
|
|
* <name> Filename to look for.
|
|
*
|
|
* (c) Marcus Boerger, 2003 - 2004
|
|
*/
|
|
|
|
if ($argc < 3) {
|
|
echo <<<EOF
|
|
Usage: php findfile.php <path> <name>
|
|
|
|
Find a specific file by name.
|
|
|
|
<path> Path to search in.
|
|
<name> Filename to look for.
|
|
|
|
|
|
EOF;
|
|
exit(1);
|
|
}
|
|
|
|
foreach(new FindFile($argv[1], $argv[2]) as $file) echo $file->getPathname()."\n";
|
|
?>
|