A pathname, string, or file-stream.
Filtering test (only pathnames matching the test are collected).
If non- nil
then directories are included in the collection.
If non- nil
(the default), then pathnames representing directories have null name components.
directory
collects all the pathnames matching the given pathname.
Because truenames are now returned, the entries
.
and ..
no longer show up in the output of directory
. This means, for instance, that
(directory #P"/usr/users/")
does not include #P"/usr"
, which is the truename of #P"/usr/users/.."
The specification is unclear as to the appropriate behavior of directory
in the presence of links to non-existent files or directories. For example, if the directory contains foo
, which is a symbolic link to bar
, and there is no file named bar
, should bar
show up in the directory listing? A keyword argument has been added which lets you control this behavior.
CL-USER 15 > (pprint (directory "."))
(#P"C:/Program Files/Xanalys/LispWorks/lib/"
#P"C:/Program Files/Xanalys/LispWorks/lispworks- 4200.exe"
#P"C:/Program Files/Xanalys/LispWorks/readme.txt"
#P"C:/Program Files/Xanalys/LispWorks/DeIsL1.isu"
#P"C:/Program Files/Xanalys/LispWorks/MSVCRT.DLL")