Common Lisp the Language, 2nd Edition

Next: Syntax of Logical Up: File Names Previous: Extended Wildcards

## 23.1.5. Logical Pathnames

Pathname values are not portable, but sometimes they must be mentioned in a program (for example, the names of files containing the program and the data used by the program).

X3J13 voted in June 1989 (PATHNAME-LOGICAL) to provide some facilities for portable pathname values. The idea is to provide a portable framework for pathname values; these logical pathnames are then mapped to physical (that is, actual) pathnames by a set of implementation-dependent or site-dependent rules. The logical pathname facility therefore separates the concerns of program writing and user software architecture from the details of how a software system is embedded in a particular file system or operating environment.

Pathname values are not portable because not all Common Lisp implementations use the same operating system and file name syntax varies widely among operating systems. In addition, corresponding files at two different sites may have different names even when the operating system is the same; for example, they may be on different directories or different devices. The Common Lisp logical pathname system defines a particular pathname structure and namestring syntax that must be supported by all implementations.

[Class]
`logical-pathname`

This is a subclass of `pathname`.

- Syntax of Logical Pathname Namestrings
- Parsing of Logical Pathname Namestrings
- Using Logical Pathnames
- Examples of the Use of Logical Pathnames
- Discussion of Logical Pathnames