On Tue 30 Aug 2011 18:06, [email protected] (Ludovic Courtès) writes: > I was actually planning to push ‘file-system-fold’, a functional > alternative to ‘ftw’, which would be along the lines of this (from > <http://git.savannah.gnu.org/cgit/libchop.git/tree/utils/chop-backup#n46>): > > (define (file-system-fold enter? leaf down up skip init file-name) > "Traverse the directory at FILE-NAME, recursively. Enter sub-directories > only when (ENTER? PATH STAT RESULT) returns true. When a sub-directory is > entered, call (DOWN PATH STAT RESULT), where PATH is the path of the > sub-directory and STAT the result of (lstat PATH); when it is left, call (UP > PATH STAT RESULT). For each file in a directory, call (LEAF PATH STAT > RESULT). Return the result of these successive applications. When ENTER? > returns no, call (SKIP PATH STAT RESULT)." > > ...)
I see that you haven't pushed this yet. Want to do so? I would be happy with a `scandir' implementation on top of this interface. We should find a way to push most POSIX things out to a module, though! Andy -- http://wingolog.org/
