I need to build a file walker from a set of glob patterns, but I prefer not to build it myself, so I would appreciate if there is already one that satisfies the following requirements:
Deterministic filename order, regardless of environment, OS, etc.
Do not walk into ignored directories, for example:
foo/** will never match any file in bar/, so it shouldn't walk into bar/
!foo and !**/foo will never match any file in foo/, so it shouldn' walk into foo/
I don't think it is what I need. I have read the documentation and do not find a way to convert a set of glob patterns to a list (or iterator) of filenames.
I had tried globwalk, but it does not give me deterministic filename order.
Probably the only way to achieve that is to read in all the files into a list, then sort them the way you need it.
The underlying OS function simply don't provide the guarantee of any order.