Common Lisp the Language, 2nd Edition

Next: File Names Up: Common Lisp the Language Previous: Querying the User

# 23. File System Interface

A frequent use of streams is to communicate with a file system to which groups of data (files) can be written and from which files can be retrieved.

Common Lisp defines a standard interface for dealing with such a file system. This interface is designed to be simple and general enough to accommodate the facilities provided by ``typical'' operating system environments within which Common Lisp is likely to be implemented. The goal is to make Common Lisp programs that perform only simple operations on files reasonably portable.

To this end, Common Lisp assumes that files are named, that given a name one can construct a stream connected to a file of that name, and that the names can be fit into a certain canonical, implementation-independent form called a pathname.

Facilities are provided for manipulating pathnames, for creating streams connected to files, and for manipulating the file system through pathnames and streams.

- File Names
  - Pathnames
  - Case Conventions
  - Structured Directories
  - Extended Wildcards
  - Logical Pathnames
    - Syntax of Logical Pathname Namestrings
    - Parsing of Logical Pathname Namestrings
    - Using Logical Pathnames
    - Examples of the Use of Logical Pathnames
    - Discussion of Logical Pathnames
  - Pathname Functions
- Opening and Closing Files
- Renaming, Deleting, and Other File Operations
- Loading Files
- Accessing Directories