All Manuals > LispWorks® User Guide and Reference Manual > 38 The LISPWORKS Package

pathname-location Function

Summary

Returns the location of a file.

Package

lispworks

Signature

pathname-location pathname => location

Arguments
pathname
A pathname designator.
Values
location
A pathname.
Description

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.

Examples

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/")))
See also

current-pathname
directory


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:41