chickadee » directory-utils » directory-fold

(directory-fold FUNCTION IDENTITY DIRECTORY [#:dotfiles? DOTFILES?]) => *procedure

Invokes FUNCTION on each filename in the DIRECTORY and the recursive value from IDENTITY. Returns the final value.

Note that only the filename is passed and not the complete pathname. The "." and ".." filenames are not supplied no matter the DOTFILES? setting.

FUNCTION is a (procedure (filename *) *).

DOTFILES is a boolean indicating whether files with a "." prefix are included in the fold. Default is #f.

On a Windows platform hidden files have a hidden attribute so this routine is rather *nix centric.