I have some directories containing test data, typically over 200,000 small (~4k) files per directory.
I am using the following C# code to get the number of files in a di
If I'm using a slowish high-level language, and portability wasn't a big concern, I'd be tempted to try calling an external program (eg `ls | wc`.first.to_i if using ruby and unix), but then I'd check whether it does the job any better.
`ls | wc`.first.to_i