Directory listings, continued Lassi Kortela 10 Dec 2019 21:19 UTC
Re: Directory listings, continued Lassi Kortela 10 Dec 2019 21:22 UTC
Re: Directory listings, continued John Cowan 10 Dec 2019 22:41 UTC
Re: Directory listings, continued Lassi Kortela 10 Dec 2019 22:46 UTC
Re: Directory listings, continued Lassi Kortela 10 Dec 2019 22:48 UTC
Re: Directory listings, continued hga@xxxxxx 10 Dec 2019 23:44 UTC
Re: Directory listings, continued John Cowan 11 Dec 2019 00:08 UTC
Re: Directory listings, continued hga@xxxxxx 11 Dec 2019 02:00 UTC
Re: Directory listings, continued Shiro Kawai 11 Dec 2019 03:16 UTC
Re: Directory listings, continued Lassi Kortela 11 Dec 2019 10:58 UTC
Re: Directory listings, continued hga@xxxxxx 11 Dec 2019 14:13 UTC
Re: Directory listings, continued John Cowan 11 Dec 2019 15:58 UTC
Generators and object ports Lassi Kortela 11 Dec 2019 17:56 UTC
Re: Generators and object ports John Cowan 11 Dec 2019 19:29 UTC
Re: Directory listings, continued Shiro Kawai 11 Dec 2019 18:50 UTC
DIrectory handles versus directory-listing handles (and procedure naming) Lassi Kortela 11 Dec 2019 13:03 UTC
Re: DIrectory handles versus directory-listing handles (and procedure naming) Lassi Kortela 11 Dec 2019 13:07 UTC
Re: DIrectory handles versus directory-listing handles (and procedure naming) hga@xxxxxx 11 Dec 2019 13:58 UTC
Re: DIrectory handles versus directory-listing handles (and procedure naming) Lassi Kortela 11 Dec 2019 14:22 UTC
Re: DIrectory handles versus directory-listing handles (and procedure naming) John Cowan 11 Dec 2019 15:10 UTC
Re: DIrectory handles versus directory-listing handles (and procedure naming) hga@xxxxxx 11 Dec 2019 15:24 UTC

Directory listings, continued Lassi Kortela 10 Dec 2019 21:19 UTC

Did our last discussion of directory listings reach a conclusion? The
current draft has three different facilities for the same job:

1. (directory-files [dir [dotfiles?]]) → string list

2. (make-directory-files-generator dir [dotfiles?]) → generator

3. (open-directory dir [dot-files?]) → directory-object
    (read-directory directory-object) → string or eof-object
    (close-directory directory-object)

The fourth possibility we discussed was a fold procedure.

Presumably the generator is a wrapper that first opens the directory;
then returns the next read-directory result on each call; and finally
closes the directory when read returns no more entries. Given that,
isn't it essentially a simpler but equally powerful interface as
open/read/write and we could just provide the generator?