next up previous contents index
Next: Logical Pathnames Up: Pathnames Previous: Unix Pathnames   Contents   Index

Wildcard Pathnames

Wildcards are supported in Unix pathnames. If `*' is specified for a part of a pathname, that is parsed as :wild. `**' can be used as a directory name to indicate :wild-inferiors. Filesystem operations treat :wild-inferiors the same as :wild, but pathname pattern matching (e.g. for logical pathname translation, see section logical-pathnames) matches any number of directory parts with `**' (see see section wildcard-matching.)

`*' embedded in a pathname part matches any number of characters. Similarly, `?' matches exactly one character, and `[a,b]' matches the characters `a' or `b'. These pathname parts are parsed as pattern objects.

Backslash can be used as an escape character in namestring parsing to prevent the next character from being treated as a wildcard. Note that if typed in a string constant, the backslash must be doubled, since the string reader also uses backslash as a quote:

(pathname-name "foo \(\backslash\backslash\)*bar") => "foo*bar"



Peter Van Eynde 2001-03-08