:UNSPECIFIC host component is assumed
to refer to the machine on which Eclipse is running. A host matching
the string returned by the function
machine-instance is
also recognized as referring to a pathname on the machine running
Eclipse.
Other host component strings are accepted within pathnames (i.e. within pure pathname operations), but at this time, only the local host is recognized for interactions with the file system (eg. actually opening a file).
:NEWEST refers to the largest version number that
already exists in the file system when reading, overwriting,
appending, superseding, or directory listing an existing file. It
refers to the smallest version number greater than any
existing version number when creating a new file. This can be
specified within namestrings as "newest" or
"0".
:PREVIOUS refers to the version before the
largest version number that already exists in the file system. This
can be specified within namestrings as "previous" or
"-1".
:OLDEST designates the smallest existing version
number. This can be specified within namestrings as
"oldest" or "-2".
A file in the file system with version :UNSPECIFIC is
always considered to be a higher version than any numbered version.
When creating a :NEWEST file, there are two possible
actions, depending on the state of matching files in the file system:
:UNSPECIFIC.
This allows mnemonic versions such as :NEWEST to work
regardless of whether or not files have been set up outside of Eclipse
to use version numbers.
N.B.: The concept of version numbers, as defined by Common Lisp, has nothing to do with file-write-date. It is possible to create a file, using Eclipse or some other facility, which has a version number lower than another file, but which has a file-write-date that is greater than the other file.
There are two Eclipse-specific aspects of this last issue that are of note:
"/dir/subdir" or
"/dir/subdir/"). In other words, something that looks
like a filename might refer to a file or to a directory.
In Eclipse, the truename of a directory is always
canonicalized such that the namestring prints as a directory
(eg. "/dir/subdir/"), and the pathname-name,
pathname-type and pathname-version are all
:UNSPECIFIC.
:UPCASE, (the default,) all lowercase characters that
will form the name of a symbol are converted to the
corresponding uppercase character at read time.
Eclipse uses a similar canonicalization when converting namestrings
to pathnames. Logical pathname namestrings are canonicalized as
though by readtable-case :UPCASE, so logical pathnames
are effectively case insensitive and the component strings are always
uppercase. Other pathname types might use other case canonicalizations,
equivalent to readtable-case :PRESERVE for a
case-sensitive system in which namestrings are normally entered in
uppercase or :INVERT for a case-sensitive system in
which namestrings are normally entered in lowercase.
Some pathname types might support additional canonicalizations. For
example, for a host that only supports three letter file
types, the version component of "file.lsp"
might be canonicalized to "LISP". No such
additional canonicalizations are currently defined.
Comparisons of components for pathname-match-p and its callers are case sensitive, but use the canonicalized components.
:UNSPECIFIC components.
:UNSPECIFIC components are ommited from namestrings.
Most Lisp file system operations perform merging, logical-pathname
translation, and explicit checking for wild components. The
consequences are undefined if the result of this process yields a
namestring that is not valid or complete for the corresponding file
system. For example, if a directory is explicitly given as
:UNSPECIFIC, and thus cannot be merged out by Eclipse,
then the operating system might use the "root" directory or supply
some default directory that may be different than the current value of
*default-pathname-defaults*.
The consequences are undefined for file system interactions if a character that is not an ASCII-char appears in a final pathname namestring.
Eclipse currently recognizes Unix pathnames and Windows pathnames.
HOST-NAME: prefix. For example,
foo:/usr/joe/file.lisp.9
parses as
#S(PATHNAME :HOST "foo" :DEVICE :UNSPECIFIC
:DIRECTORY (:ABSOLUTE "usr" "joe")
:NAME "file" :TYPE "lisp" :VERSION 9)
(See Printing, in "Eclipse-Defined ANSI features".)
Namestrings are canonicalized as though by readtable-case
:INVERT.
The default device for all Unix pathnames is
:UNSPECIFIC.
[HOST-NAME] prefix. For example,
[foo]d:\usr\joe\file.lisp.9
parses as
#S(PATHNAME :HOST "FOO" :DEVICE "D"
:DIRECTORY (:ABSOLUTE "USR" "JOE")
:NAME "FILE" :TYPE "LISP" :VERSION 9)
(See Printing, in "Eclipse-Defined ANSI features".)
Namestrings are canonicalized as though by readtable-case
:UPCASE.
Both forward slashes '/' and backslashes '\'
may be used in Windows namestrings. Pathname namestrings are printed
using backslashes, which the Lisp printer escapes by preceding them
with an additional backslash:
(pathname "/foo/bar") => #P"\\FOO\\BAR" (length (namestring *)) => 8
The default device is :UNSPECIFIC, which means that
the operating system's current default drive is used.
:WILD-INFERIORS and :WILD are
supported.
* and ?, when embedded
in a component string, act the same with respect to letters as
:WILD-INFERIORS and :WILD, respectively, do
with respect to list structured directory elements. Wild characters
appearing in pathname components are not escaped in namestrings or
when interacting with the operating system.
As with pathname-match-p, the components are operated on in
:COMMON :CASE, so the :LOCAL :CASE of
translated components may change if the pathname host changes after
the translation.
(make-pathname :host "SYS" :directory '(:absolute "SITE") :name host :type "HOST" :version :newest)The definition of the
SYS logical host is defined by Lisp Top-Level features.
In Eclipse, directory accepts an additional keyword argument
named :LINKS, which specifies whether links should be
followed during resolution to truenames.
See the Eclipse Dictionary specification for directory.