Common Lisp the Language, 2nd Edition

Next: Using Logical Pathnames Up: Logical Pathnames Previous: Syntax of Logical

### 23.1.5.2. Parsing of Logical Pathname Namestrings

Logical pathname namestrings are recognized by the functions `logical-pathname` and `translate-logical-pathname`. The host portion of the logical pathname namestring and its following colon must appear in the namestring arguments to these functions.

The function `parse-namestring` recognizes a logical pathname namestring when the host argument is logical or the defaults argument is a logical pathname. In this case the host portion of the logical pathname namestring and its following colon are optional. If the host portion of the namestring and the host argument are both present and do not match, an error is signaled. The host argument is logical if it is supplied and came from `pathname-host` of a logical pathname. Whether a host argument is logical if it is a string `equal` to a logical pathname host name is implementation-defined.

The function `merge-pathnames` recognizes a logical pathname namestring when the defaults argument is a logical pathname. In this case the host portion of the logical pathname namestring and its following colon are optional.

Whether the other functions that coerce strings to pathnames recognize logical pathname namestrings is implementation-defined. These functions include `parse-namestring` in circumstances other than those described above, `merge-pathnames` in circumstances other than those described above, the `:defaults` argument to `make-pathname`, and the following functions:

    compile-file           file-write-date     pathname-name
    compile-file-pathname  host-namestring     pathname-type
    delete-file            load                pathname-version
    directory              namestring          probe-file
    directory-namestring   open                rename-file
    dribble                pathname            translate-pathname
    ed                     pathname-device     truename
    enough-namestring      pathname-directory  wild-pathname-p
    file-author            pathname-host       with-open-file
    file-namestring        pathname-match-p

Note that many of these functions must accept logical pathnames even though they do not accept logical pathname namestrings.

Next: Using Logical Pathnames Up: Logical Pathnames Previous: Syntax of Logical