I already had this need of file walking for one of my project. I also needed it to be portable on Linux and Windows.
I did not found an open source implementation for it and finally ended up implementing it myself. This was finally not too much work.
On the Linux side, I used opendir()
and readdir()
to iterate over directory entries.
On the Windows side, I used FindFirstFileA()
and FindNextFileA()
to do the job.
Next for each entry, I simply call a used defined callback.
Both implementations does not take much than 100 lines of code... So I would suggest you to DIY.