List Info

Thread: Re: inconsistent pathnames




Re: inconsistent pathnames
country flaguser name
United States
2007-09-06 09:40:00
Walter C. Pelissero wrote:
> Raymond Toy (RT/EUS) writes:
>  > >  > I also now see there are a whole bunch
of issues, like how should
>  > >  > "..a" be parsed?  Is it name
= "..a", type = nil, or name = ".",
type
>  > >  > "a", or something else?  My
head hurts.
>  > > 
>  > > I suppose anything goes as long as you are
consistent.  After all the
>  > > concept of file type in the pathname is
alien to the Unix filesystem.
>  > > Though, I can immagine, different behaviours
from different Lisp
>  > > implementations may cause portability
issues.
>  > 
>  > Converting strings to pathnames has never been
portable.  If you want 
>  > portability, you need to use make-pathname
directly.
> 
> Well, there are situation where you can't use
MAKE-PATHNAME yourself.
> DIRECTORY, for instance, will use it for you.  That BTW
was the source
> of my problems.  Knowing in advance what goes in type
and what goes in
> name, I believe, does simplify writing portable code.

Where can't you use make-pathname yourself?  What do you
mean directory 
will use it for you?  (directory (make-pathname :directory
'(:absolute) 
:name :wild)) works for me.

I would like to know how directory was the source of your
problem.  Was 
it because directory returned a list of pathnames for which
no 
namestring could be printed, like "..."?  Or
something else.

BTW, I've applied your patch.  It looks good, and actually
fixes the 
issue I raised about "..a".  It is now :name
".", :type "a".  This is 
ok.  It also passes a simple testsuite of pathnames, but
some more 
testing needed.

Ray


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )