I want a program that will open a directory and traverse the entire tree under it, touching each file in every directory.
Specifically, I'm going to read the extended attributes of every file -- I know how to do that, but I'm sure there's an easier method of getting every filename than by dumping a DIR and writing a parsing routine.
Or is there?
No, there isn't. You have to do a little work here! Nothing annoys me more than these sorts of questions. If you want an easy fix, then you should invest in some sort of third party middleware. If you are no good at programming then perhaps you should practice more. We welcome here specific questions from hard working programmers, not lazy minded script kiddies.
I know I've seen an elegant solution to this elsewhere, but haven't been able to find it. If you have any hints on where I might find a reference, feel free to suggest a place to search. I feel like I'm reinventing the wheel in coming up with a solution.
Like what third party middlewhere, Sebastiana? If you have nothing to add, then don't waste the time typing. There's nothing more annoying than answers from lazy minded flame baiters.
findfirst / findnext
In whatever form your compiler has decided to spell them
If it's UNIX, check for opendir, readdir(), closedir()