Pathnames

Pathnames give the way to analyze and compose file names OS-independently. A typical path name is assumed to be consisted of following components: host:device/directory1/.../directory-n/name.type.version. Since EusLisp only runs on Unix, host, device and version fields are ignored. The pathname function decomposes a string into a list of directory components, name and type, and returns a pathname object, which is printed as a string prefixed by #P.



pathnamep name [function]

returns T if name is a pathname.


pathname name [function]

name is pathname or string. name is converted to pathname. To indicate the last name is a directory name, don't forget to suffix with "/". The inverse conversion is performed by namestring.


pathname-directory path [function]

returns a list of directory names of path. Root directory (/) is represented by :ROOT. path can be either of string or pathname.


pathname-name path [function]

returns the file-name portion of path. path can be either of string or pathname.


pathname-type path [function]

extracts the file-type portion out of path. path can be either of string or pathname.


make-pathname &key host device directory name type version defaults [function]

makes a new pathname from directory, name and type. On unix, other parameters are ignored.


merge-pathnames name &optional (defaults *default-pathname-defaults*)) [function]



namestring path [function]
returns string representation of path.


parse-namestring name [function]


truename path [function]
tries to find the absolute pathname for the file named path.


k-okada 2013-05-21