[plt-scheme] finding a file

From: David Herman (dherman at ccs.neu.edu)
Date: Sat Feb 19 21:11:57 EST 2005

> (find-files
>   (lambda (x)
>     (equal? (filename x) "myfile.scm")))
> Does it exist or is there another way?  I could use a regular
> expression to pick up everything after the last directory delimiter in
> the path x, but that seems crude.   What's the  "right" way to do
> this?

Try my PLaneT library, io.plt:


The procedure you want is called basename (named after the Unix 

     (require (planet "file.ss" ("dherman" "io.plt" 1)))

       (lambda (f)
         (string=? (path->string (basename f))


Posted on the users mailing list.