When a pathname is to be fully specified (no wildcards), that
means that no :WILD
, :WILD-INFERIORS
is allowed, no wildcard
characters are allowed in the strings, and name
EQ
NIL
may not
be allowed either.
As permitted by the MAKE-PATHNAME
specification, the PATHNAME
directory component is canonicalized when the pathname is constructed:
""
and
"."
are removed".."
,
"*"
, and "**"
are converted
to :UP
, :WILD
and :WILD-INFERIORS
,
respectivelyfoo/../
are
collapsed
Pathname components
host
NIL
device
NIL
directory
= (startpoint
. subdirs
)
element | values | meaning |
---|---|---|
startpoint | :RELATIVE | :ABSOLUTE | |
subdirs | () | ( | |
subdir | :WILD-INFERIORS | ** or
... , all subdirectories |
subdir | SIMPLE-STRING ,
may contain wildcard characters "?" and
"*" (may also be specified as :WILD ) |
name
type
NIL
or SIMPLE-STRING
, may contain wildcard characters "?"
and
"*"
(may also be specified as :WILD
)
version
NIL
or :WILD
or :NEWEST
(after merging the defaults)A UNIX filename is split into name and type.
Pathname components
host
NIL
or SIMPLE-STRING
, wildcard characters may
occur but do not act as wildcardsdevice
NIL
or :WILD
or A
|...|Z
directory
= (startpoint
. subdirs
)
element | values | meaning |
---|---|---|
startpoint | :RELATIVE | :ABSOLUTE | |
subdirs | () | ( | |
subdir | :WILD-INFERIORS | ** or
... , all subdirectories |
subdir | SIMPLE-STRING ,
may contain wildcard characters "?" and
"*" (may also be specified as :WILD ) |
name
type
NIL
or SIMPLE-STRING
, may contain wildcard characters "?"
and
"*"
(may also be specified as :WILD
)
version
NIL
or :WILD
or :NEWEST
(after merging the defaults)If host
is non-NIL
, device
must be NIL
.
A Win32 filename is split into name and type.
External notation: | "A:\sub1.typ\sub2.typ\name.typ" |
using defaults: | "\sub1.typ\sub2.typ\name.typ" |
or | "name.typ" |
or | "*:\sub1.typ\**\sub3.typ\x*.lisp" |
or similar. |
Instead of "\"
one may use "/"
, as usual for DOS
calls.
If host
is non-NIL
and the directory
's startpoint
is not :ABSOLUTE
, (
will not be the same as PARSE-NAMESTRING
(NAMESTRING
pathname
))pathname
.
A filename is split into name and type according to the following rule:
"."
in the filename, then the
name
is everything, type
is NIL
;"."
, then name
is the part
before and type
the part after the last dot.if the only "."
is the first character, then
the behavior depends on the value of the user variable
CUSTOM:*PARSE-NAMESTRING-DOT-FILE*
which can be either
Due to this name/type splitting rule, there are pathnames
that cannot result from PARSE-NAMESTRING
.
To get a pathname whose type contains a dot or whose name contains a
dot and whose type is NIL
, MAKE-PATHNAME
must be used. Example:
(
.MAKE-PATHNAME
:NAME
"foo.bar")
These notes document CLISP version 2.49 | Last modified: 2010-07-07 |