Re: inconsistent pathnames

"Raymond Toy (RT/EUS)" <[email protected]>
Newsgroups gmane.lisp.cmucl.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.