Can PHP's glob() be made to find files in a case insensitive manner?
Glob patterns support character ranges:
glob('my/dir/*.[cC][sS][vV]')
You could do this
$files = glob('my/dir/*');
$csvFiles = preg_grep('/\.csv$/i', $files);
glob('my/dir/*.[cC][sS][vV]')
should do it. Yeah it's kind of ugly.