chickadee » srfi-170 » make-directory-files-generator

make-directory-files-generator dir #!optional (dot-files? #f)procedure

Return a SRFI 158 generator of the filenames in directory dir. The special . and .. names are never returned. Like directory-files above, the directory dir is not prepended to each filename 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. Note that the generator must be run to exhaustion to close the underlying open directory object. As an extension to the standard, you can pass the symbol 'close to the generator to close it early.

dir
path
dot-files?
whether filenames beginning with "." are returned