From: ············@hotmail.com
Subject: Finding a file in a subdirectory
Date: 
Message-ID: <21653efa-56d9-447f-8b4f-57f2fc573172@s50g2000hsb.googlegroups.com>
I need to find a file for which I don't know the full path. I just
have the filename and the root directory. Before I start writing a
function to loop recursively over the subdirectories using probe-file,
is there a standard function that will do this? Preferably portable to
different OS?
Thanks a lot for any tips.

From: Edi Weitz
Subject: Re: Finding a file in a subdirectory
Date: 
Message-ID: <uod8bpjz9.fsf@agharta.de>
On Tue, 15 Apr 2008 01:59:49 -0700 (PDT), ············@hotmail.com wrote:

> I need to find a file for which I don't know the full path. I just
> have the filename and the root directory. Before I start writing a
> function to loop recursively over the subdirectories using
> probe-file, is there a standard function that will do this?
> Preferably portable to different OS?

Not a standard function but maybe helpful in your case:

  http://weitz.de/cl-fad/#walk-directory

Edi.

-- 

European Common Lisp Meeting, Amsterdam, April 19/20, 2008

  http://weitz.de/eclm2008/

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: ············@hotmail.com
Subject: Re: Finding a file in a subdirectory
Date: 
Message-ID: <00d7b7a2-6100-499f-8501-8626ae3c5c41@a5g2000prg.googlegroups.com>
On Apr 15, 11:04 am, Edi Weitz <········@agharta.de> wrote:
> On Tue, 15 Apr 2008 01:59:49 -0700 (PDT), ············@hotmail.com wrote:
> > I need to find a file for which I don't know the full path. I just
> > have the filename and the root directory. Before I start writing a
> > function to loop recursively over the subdirectories using
> > probe-file, is there a standard function that will do this?
> > Preferably portable to different OS?
>
> Not a standard function but maybe helpful in your case:
>
>  http://weitz.de/cl-fad/#walk-directory
>
> Edi.
>
> --
>
> European Common Lisp Meeting, Amsterdam, April 19/20, 2008
>
>  http://weitz.de/eclm2008/
>
> Real email: (replace (subseq ·········@agharta.de" 5) "edi")

Thanks, it's just what I was looking for. As a side comment, looking
at the library I am just amazed that CL didn't include these functions
by default in the standard, and instead one needs to write this
sophisticated library to obtain some rather basic functions.
From: John Thingstad
Subject: Re: Finding a file in a subdirectory
Date: 
Message-ID: <op.t9nm5imdut4oq5@pandora.alfanett.no>
P� Tue, 15 Apr 2008 14:17:48 +0200, skrev <············@hotmail.com>:

> On Apr 15, 11:04 am, Edi Weitz <········@agharta.de> wrote:
>> On Tue, 15 Apr 2008 01:59:49 -0700 (PDT), ············@hotmail.com  
>> wrote:
>> > I need to find a file for which I don't know the full path. I just
>> > have the filename and the root directory. Before I start writing a
>> > function to loop recursively over the subdirectories using
>> > probe-file, is there a standard function that will do this?
>> > Preferably portable to different OS?
>>
>> Not a standard function but maybe helpful in your case:
>>
>>  http://weitz.de/cl-fad/#walk-directory
>>
>> Edi.
>>
>> --
>>
>> European Common Lisp Meeting, Amsterdam, April 19/20, 2008
>>
>>  http://weitz.de/eclm2008/
>>
>> Real email: (replace (subseq ·········@agharta.de" 5) "edi")
>
> Thanks, it's just what I was looking for. As a side comment, looking
> at the library I am just amazed that CL didn't include these functions
> by default in the standard, and instead one needs to write this
> sophisticated library to obtain some rather basic functions.

Lisp does provide the functions.
Appart from walk directory all the functions have a equivalent in CL.
CL-FAD is just a thin compatabillity layer over some wrinkles that exist  
in the CL functions.
See www.gigamonkeys.com/book chapters 14 and 15

--------------
John Thingstad
From: Pascal J. Bourguignon
Subject: Re: Finding a file in a subdirectory
Date: 
Message-ID: <7c63uh20po.fsf@pbourguignon.anevia.com>
············@hotmail.com writes:

> I need to find a file for which I don't know the full path. I just
> have the filename and the root directory. Before I start writing a
> function to loop recursively over the subdirectories using probe-file,
> is there a standard function that will do this? Preferably portable to
> different OS?
> Thanks a lot for any tips.

I would do:

  (directory (merge-pathnames (make-pathname :directory '(:relative :wild-inferiors)
                                             :name (pathname-name filename)
                                             :type (pathname-type filename))
                              root-directory nil))

                                           
-- 
__Pascal Bourguignon__