chickadee » directory-utils » directory-unfold

directory-unfold DIRECTORY TEST NEXT SEED #!optional SHOW-DOTFILES?procedure

Walks DIRECTORY, visiting subdirectories based on TEST, and calling NEXT on the recursive value from SEED and each pathname in the directories. Returns the final value.

Directories for which TEST fails are handled by NEXT. The passed pathname is a directory-separator suffixed dirname; example "b/".

TEST
(pathname -> 'a ; called with the full pathname.
NEXT
('a pathname -> 'a) ; called with the full pathname.
SEED
'a.
SHOW-DOTFILES?
boolean ; include files with a "." prefix ; Default #f.