Re: [racket-users] Built-in way to list all children of a directory?

2017-06-27 Thread Ben Greenman
The predicate can be any function. All files: `(find-files (lambda (x) #true) start-path)` All pdf files: `(find-files (lambda (x) (equal? #".pdf" (path-get-extension x))) some-path)` There's also the `file/glob` module. All pdf files: `(glob (build-path some-path "**" "*.pdf"))` Iterator for

Re: [racket-users] Built-in way to list all children of a directory?

2017-06-27 Thread Glenn Hoetker
Struggling as a newbie with the documentation for find-files. In particular, the "predicate" part of (find-files predicate [ start-path] #:skip-filtered-directory? skip-filtered-directory? #:follow-links?

Re: [racket-users] Built-in way to list all children of a directory?

2017-06-27 Thread Matthew Flatt
At Tue, 27 Jun 2017 18:31:21 -0700 (PDT), Glenn Hoetker wrote: > As far as I can tell, (directory-list some-path) yields a list of > files and directories immediately below some-path. I wish to capture > all files and directories in some-path or any of the sub-directories > of some-path. I would

Re: [racket-users] Built-in way to list all children of a directory?

2017-06-27 Thread Matthew Butterick
> On Jun 27, 2017, at 6:31 PM, Glenn Hoetker > wrote: > > Naive question, here. As far as I can tell, (directory-list some-path) > yields a list of files and directories immediately below some-path. I wish to > capture all files and