---------- Forwarded message ---------
From: John Cowan <email@example.com>
Date: Tue, Sep 3, 2019 at 5:56 PM
Subject: Re: Outstanding issue: directory-files in the context of huge directories
So here's the generator:
((dir dot-files?) (make-directory-files-generator* dir dot-files?))
((dir) (make-directory-files-generator* dir #f))))
(define (make-directory-files-generator* dir dot-files?)
(let ((dir-obj (open-directory dir dot-files?))
(let ((f (read-directory dir-obj)))
(if (eq? f eof) (close-directory dir-obj))
I haven't actually tested this, but it's at least conceptually correct.
Although this overlaps the utility of directory-files, I want to preserve the latter (and Harold agrees). When WG1 voted on the issue, directory-files was the highest-ranking result in the STV voting; however, it did not command a majority of the votes cast, which is why it does not appear in R7RS-small.