From: Peter Seibel
Subject: Relation between PATHNAME-MATCH-P and DIRECTORY?
Date: 
Message-ID: <m3smn4f7v3.fsf@javamonkey.com>
My reading of the dictionary entry for DIRECTORY, which says:

  Determines which, if any, files that are present in the file system
  have names matching pathspec, and returns a fresh list of pathnames
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  corresponding to the truenames of those files.

would lead me to expect that if:

 (pathname-match-p file wild) ==> T

and file isn't itself wild, that:

 (member file (directory wild) :test #'equalp)

would also be true. However that doesn't seem to uniformly be the case
on several implementations in certain situations.

Am I at least right in my interpretation of the spec? I.e. is there
supposed to be this correspondence between PATHNAME-MATCH-P and
DIRECTORY?

-Peter

-- 
Peter Seibel                                      ·····@javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp
From: Peter Seibel
Subject: Re: Relation between PATHNAME-MATCH-P and DIRECTORY?
Date: 
Message-ID: <m3oexsezr3.fsf@javamonkey.com>
Peter Seibel <·····@javamonkey.com> writes:

> My reading of the dictionary entry for DIRECTORY, which says:
> 
>   Determines which, if any, files that are present in the file system
>   have names matching pathspec, and returns a fresh list of pathnames
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   corresponding to the truenames of those files.
> 
> would lead me to expect that if:
> 
>  (pathname-match-p file wild) ==> T
> 
> and file isn't itself wild, that:
> 
>  (member file (directory wild) :test #'equalp)
> 
> would also be true. However that doesn't seem to uniformly be the case
> on several implementations in certain situations.
> 
> Am I at least right in my interpretation of the spec? I.e. is there
> supposed to be this correspondence between PATHNAME-MATCH-P and
> DIRECTORY?

So, I kept reading and found this in the PATHNAME-MATCH-P directory
entry:

  "The matching rules are implementation-defined but should be
  consistent with directory."

So I guess I have a beef with CLISP and SBCL and should probably take
it up on the appropriate developer's lists unless someone can show me
something I'm missing.

-Peter

-- 
Peter Seibel                                      ·····@javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp