<div><div>I was tinkering with DIRECTORY, attempting to debug something with ASDF. </div><div><br></div><div>I discovered that (DIRECTORY "*") was returning directories in the current working directory, but not directories with dots in their names.</div>
<div><br></div><div>Reading the CCL docs <a href="http://ccl.clozure.com/manual/chapter4.4.html">http://ccl.clozure.com/manual/chapter4.4.html</a> (also the docs included in trunk), the interface specifies a keyword option :DIRECTORIES which should default to NIL. It is apparently defaulting to T, and checking the source files it is coded this way. I think the documentation specifies the correct, or at least most conforming, behavior, that is, to list files. Maybe it is less surprising to get directories by default, by analogy to an OS level directory listing command like ls or dir.</div>
<div><br></div><div>However, I find it odd that specifying a file wildcard matches on directories. For instance (DIRECTORY (MAKE-PATHNAME :DIRECTORY NIL :NAME :WILD :TYPE :WILD) :DIRECTORIES T :FILES NIL) will return all directories. I would expect this to always return NIL. I'm asking for just directories which have a any filename, any type, and no directory. </div>
<div><br></div><div>I would expect (DIRECTORY (MAKE-PATHNAME :DIRECTORY '(:RELATIVE :WILD)) :DIRECTORIES T :FILES NIL) to return all directories in the current working directory, and it does. I'm asking for just directories, relative to the current working directory, with a any directory name.</div>
<div><br></div><div>The converse works as expected: (DIRECTORY (MAKE-PATHNAME :DIRECTORY '(:RELATIVE :WILD)) :DIRECTORIES NIL :FILES T) returns NIL.</div><div><br></div><div>I really don't see the need for :DIRECTORIES or :FILES at all if DIRECTORY follows the pathname object for matching.</div>
<div><br></div><div>In fact, CLISP implements DIRECTORY in this very manner. It doesn't have keyword options to specify wither files or directories are requested -- rather it uses the pathname spec. (DIRECTORY #P"*/") returns all directories, (DIRECTORY "*.*") returns all files and no directories.</div>
<div><br></div><div>Finally, DIRECTORY has an undocumented keyword option :TEST which would be super handy if it is in an appropriate state for public consumption.</div><div><br></div><div>Maybe I'm barking up the wrong tree?</div>
<div><br></div><div><br></div><div>Thanks,</div><div>Erik.</div><div><br></div><div><br></div></div>