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 all files: `(in-glob (build-path some-path "**"))`

On Tue, Jun 27, 2017 at 10:17 PM, Glenn Hoetker <ghoet...@gmail.com> wrote:

> 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? follow-links?)
>
> Can anyone offer a working example?  All file, all pdfs. Doesn't really
> matter. Just something concrete to get me started. Many thanks!
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to