Returns the location of a file.
lispworks
pathname-location pathname => location
pathname⇩ |
A pathname designator. |
location⇩ |
A pathname. |
The function pathname-location
returns a pathname location that represents the directory where the file pathname resides. Each of the name, type and version components of location are nil
.
Due to the ANSI Common Lisp definition of the directory function and the fact that LispWorks returns fully specified truenames, the form:
(directory (truename "/tmp/"))
will always signal an error or return the list (#P"/tmp/")
. To obtain the contents of the /tmp
directory, use the form:
(directory (pathname-location (truename "/tmp/")))
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:41