Can PHP's glob() be made to find files in a case insensitive manner?

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-03-26T01:27:00Z Indexed on 2010/03/26 1:33 UTC
Read the original article Hit count: 217

Filed under:
|
|

I want all CSV files in a directory, so I use

glob('my/dir/*.CSV')

This however doesn't find files with a lowercase CSV extension.

I could use

glob('my/dir/*.{CSV,csv}', GLOB_BRACE);

But is there a way to allow all mixed case versions? Or is this just a limitation of glob() ?

© Stack Overflow or respective owner

Related posts about php

Related posts about glob