From c4dd7a1a684490673e25aaf4fabec5df138854c4 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Thu, 14 Mar 2013 05:42:27 +0000 Subject: Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2. --- ext/spl/examples/findregex.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 ext/spl/examples/findregex.php (limited to 'ext/spl/examples/findregex.php') diff --git a/ext/spl/examples/findregex.php b/ext/spl/examples/findregex.php new file mode 100755 index 0000000..b43ee0c --- /dev/null +++ b/ext/spl/examples/findregex.php @@ -0,0 +1,36 @@ + \ + * + * \ Path to search in. + * \ Filename to look for. + */ + +if ($argc < 3) { + echo << + +Find a specific file by name. + + Path to search in. + Regex for filenames to look for. + + +EOF; + exit(1); +} + +if (!class_exists("RegexFindFile", false)) require_once("regexfindfile.inc"); + +foreach(new RegexFindFile($argv[1], $argv[2]) as $file) +{ + echo $file->getPathname()."\n"; +} + +?> \ No newline at end of file -- cgit v1.2.1