(make-directory-files-generator dir [dotfiles?])
→ generator (procedure)
Return a SRFI 158 generator of the file names in directory dir. The dotfiles? flag (default #f
) causes dot files to be included in the list. Regardless of the value of dotfiles?, the two files .
and ..
are never returned.
Like directory-files
above, the directory dir is not prepended to each file name in the results the generator returns.
The generator approach is particularly useful when the number of items in a directory might be "huge", which has been a common paradigm when using a file system as a document database.