List only *.csv files

That function determine whether the instance is a directory or a file, not what the extension of a file is.

Seeing your code would be useful.