in reply to Reading from ls-lrt (was: Reading)

opendir, readdir and stat should make all this a lot more portable and allow you to be more explicit with what you are doing.

update: Heh. And Mr. Nick has already written a great example of this!