I haven't been able to find much on PM about glob v. readdir but what I did find (I don't use glob, I use readdir) suggests that I should be using readdir, and japhy, your code uses readdir so I assume this is the way forward. I guess the next step is to benchmark.