1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Files
archived-php-src/ext/spl/examples/findfile.inc
T
Marcus Boerger bec76cab71 Update examples
2004-01-25 13:03:24 +00:00

25 lines
395 B
PHP
Executable File

<?php
/**
* @brief Base class to find files
* @author Marcus Boerger
* @version 1.0
*
*/
class FindFile extends FilterIterator
{
protected $file;
function __construct($path, $file)
{
$this->file = $file;
parent::__construct(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)));
}
function accept()
{
return !strcmp($this->current(), $this->file);
}
}
?>