[plt-scheme] finding a file

From: Larry White (ljw1001 at gmail.com)
Date: Sat Feb 19 15:20:01 EST 2005

I want to find a file in a subdirectory.  The name of the subdirectory
is not known in advance, but the name of the file is.  If I were
looking for all the files with a particular extension I could use
(find-files ...) and  (filename-extension x) like so:

  (lambda (x) 
    (equal? (filename-extension x) "scm")))

but there doesn't seem to be an equivelent method for pulling out the
full name of the file from the path.  It seems like there should be
something like this

  (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

thanks for your help.

Posted on the users mailing list.