Use glob like so:
glob
$file_paths = glob('/path/to/files/*.extension');
Check out the glob function
$files=glob("/path/to/your/folder/*.css");foreach ($files as $file) { echo "$file<br>";}
I don't know about wordpress
But in PHP, you want the glob command - http://php.net/glob