private function scan($directory, $filename)
    {
        $filename = strtolower($filename);

        foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($directory)) as $file) {
            if (strtolower($file->getFilename()) == $filename) {
                return $file->getRealPath();
            }
        }

        return null;
    }
private function scan($directory, $filename)
    {
        $filename = strtolower($filename);

        foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($directory)) as $file) {
            if (strtolower($file->getFilename()) == $filename) {
                return $file->getRealPath();
            }
        }

        return null;
    }
private function scan ( $ directory , $ filename ) { $ filename = strtolower ( $ filename ) ; foreach ( new \ RecursiveIteratorIterator ( new \ RecursiveDirectoryIterator ( $ directory ) ) as $ file ) { if ( strtolower ( $ file -> getFilename ( ) ) == $ filename ) { return $ file -> getRealPath ( ) ; } } return null ; }
Scan a directory for a filename

@param   string $directory The start directory
@param   string $filename  The filename to search for

@return  string|null  The path, if found, null else
Scan a directory for a filename