Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Relation between PATHNAME-MATCH-P and DIRECTORY?

8 views
Skip to first unread message

Peter Seibel

unread,
Sep 10, 2003, 9:11:14 PM9/10/03
to
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 pe...@javamonkey.com

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

Peter Seibel

unread,
Sep 11, 2003, 12:06:26 AM9/11/03
to
Peter Seibel <pe...@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.

0 new messages