Daniel, that's awesome. How would I filter down this list according to the regex?
(define list-of-files (map path->string (directory-list starting-path))) On Tuesday, May 11, 2021 at 6:57:03 PM UTC-6 daniel....@gmail.com wrote: > Hi Robert > > > > Even better if I could point the function at a directory, it finds all > of the images in it, and creates the data structure for me. Any ideas? > > You can get the files in a directory using *directory-list *and filter > for the image files using a regex. > > (for ([f (directory-list "/some/path")] #:when (regexp-match? "\\.png$" f)) > (displayln f)) > > Dan > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/60a95d69-a124-4454-bb70-20f8ac04e6f9n%40googlegroups.com.