Re: Testing for the existence of a file
From: Vassil Nikolov (vnikolov_at_poboxes.com)
Date: 08/31/04
- Next message: Rob Warnock: "Re: Deep Typing for Plain Old Lists - A new kind of LISP?"
- Previous message: Vassil Nikolov: "Re: Lisp version of a C'ism"
- In reply to: Pascal Bourguignon: "Re: Testing for the existence of a file"
- Next in thread: Pascal Bourguignon: "Re: Testing for the existence of a file"
- Reply: Pascal Bourguignon: "Re: Testing for the existence of a file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 30 Aug 2004 23:18:36 -0400
Pascal Bourguignon <spam@mouse-potato.com> writes:
> Barry Margolin <barmar@alum.mit.edu> writes:
>
>> In article <87d619nrsj.fsf@david-steuber.com>,
>> David Steuber <david@david-steuber.com> wrote:
>>
>> > Is there a simple way to use a wild pathname to find both foo.data and
>> > foo.data.gz? Or do I have to construct a pathname for each?
>>
>> I don't think there's an easy way to match both at once without possibly
>> matching other names. foo.data is name "foo" and type "data", while
>> foo.data.gz is name "foo.data" and type "gz". You could try:
>>
>> (directory "foo*.*")
>>
>> but this will also match things like foobar.data.
>
> That is to say, Common-Lisp CANNOT access all the files and items in
> your file system! (ie. CANNOT reliably and portably).
>
> To handle this dot problem, perhaps you should rename all the items to
> match the "portability" rule of file systems:
>
> Use only one dot, preceded between one and eight letters, digits,
> underline or dash, and followed between one and three letters,
> digits, underline or dash.
...where each letter is one of the 26 uppercase letters of the
English alphabet. For even better portability, do not assume that
the file name and the file type will always be separated by a dot in
the pathnmame strings used by the operating system.
---Vassil.
-- Vassil Nikolov <vnikolov@poboxes.com> Hollerith's Law of Docstrings: Everything can be summarized in 72 bytes.
- Next message: Rob Warnock: "Re: Deep Typing for Plain Old Lists - A new kind of LISP?"
- Previous message: Vassil Nikolov: "Re: Lisp version of a C'ism"
- In reply to: Pascal Bourguignon: "Re: Testing for the existence of a file"
- Next in thread: Pascal Bourguignon: "Re: Testing for the existence of a file"
- Reply: Pascal Bourguignon: "Re: Testing for the existence of a file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|