On Wednesday, Jan 29, 2003, at 14:38 America/New_York, Pascal
> Marco Antoniotti writes:
>> The following discussion is moot since
>> is not a logical pathname designator.
> pathspec---a logical pathname, a logical pathname namestring, or a
> Oops, you're right.
>> This is a bug in CLisp, as it should signal an error, as per CLHS
>> definition of the function LOGICAL-PATHNAME.
>> You may argue that the CLHS is bogus here, but that is a totally
>> different issue.
> Unfortunately, I hoped that it was only an implementation issue.
> I note that logical-pathname takes a stream too, and that a stream can
> be obtained from a pathname designator.
> So, I suppose that the only Common-Lisp compatible way to get a
> logical-pathname from an implementation dependant string is with:
> (let ((already-existed (open "/home/pascal/tmp/test/file" :direction
> (prog1 (logical-pathname (open "/home/pascal/tmp/test/file"
> :direction :read
> :if-does-not-exist :create))
> (unless already-existed (delete-file
> and this works only for files and when we have access rights to the
> directory. Anything else simplier?
No. AFAIU Even the above would not work. Check the spec for the
In the example above OPEN will return a PATHNAME not a
LOGICAL-PATHNAME. Hence you cannot use LOGICAL-PATHNAME as you hope do
In CL the process of translating a logical pathname is unidirectional
and not reversible. Which is what it seems you are trying to do.
> Well, once more I notice useless features in Common-Lisp, that is,
> features so ill-defined that you have to write your own. I'll parse
> namestrings myself and build pathnames by hand.
That is exactly the wrong approach. The pathname stuff in CL is
difficult and sometime non univocally defined, but it works.
What exactly are you trying to do?
Note that your main entry points in the CL pathname subsystem are
PARSE-NAMESTRING and LOGICAL-PATHNAME-TRANSLATIONS.
If you stick to these you will solve most of your problems.
> I notice that there is no way to get a logical-pathname but from a
> logicial-pathname-namestring. Is that correct?
Yes (or from another logical pathname, or a stream with an associated
NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488
715 Broadway 10th FL fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.