[ Resolved dot files issues. ]
- Common Lisp used to have a 'with-directory-iterator' function in some
third-party library. So instead of returning a list of names, it
returned an iterable. For filtering, this could be the best option. A
directory _can_ in principle have 10k files or even more.
It's trivial to transform open-directory into a generator, and then you get the full power of SRFI 158.
+1 for directory-fold, but -1 for returning an arbitrary number of results, which just complicates matters for the users. You could implement directory-fold on top of a read-many-entries call in C and then do the conversion en masse, though.