next up previous contents
Next: 2.13.2 Wildcard Pathnames Up: 2.13 Pathnames Previous: 2.13 Pathnames

2.13.1 Unix Pathnames

 

Unix pathnames are always parsed with a unix-host object as the host and nil as the device. The last two dots (.) in the namestring mark the type and version, however if the first character is a dot, it is considered part of the name. If the last character is a dot, then the pathname has the empty-string as its type. The type defaults to nil and the version defaults to :newest.

(defun parse (x)
  (values (pathname-name x) (pathname-type x) (pathname-version x)))

(parse "foo") tex2html_wrap_inline15923 "foo", NIL, :NEWEST (parse "foo.bar") tex2html_wrap_inline15923 "foo", "bar", :NEWEST (parse ".foo") tex2html_wrap_inline15923 ".foo", NIL, :NEWEST (parse ".foo.bar") tex2html_wrap_inline15923 ".foo", "bar", :NEWEST (parse "..") tex2html_wrap_inline15923 ".", "", :NEWEST (parse "foo.") tex2html_wrap_inline15923 "foo", "", :NEWEST (parse "foo.bar.1") tex2html_wrap_inline15923 "foo", "bar", 1 (parse "foo.bar.baz") tex2html_wrap_inline15923 "foo.bar", "baz", :NEWEST

The directory of pathnames beginning with a slash (or a search-list, see section 2.13.4) is starts :absolute, others start with :relative. The .. directory is parsed as :up; there is no namestring for :back:

(pathname-directory "/usr/foo/bar.baz") tex2html_wrap_inline15923 (:ABSOLUTE "usr" "foo")
(pathname-directory "../foo/bar.baz") tex2html_wrap_inline15923 (:RELATIVE :UP "foo")


Raymond Toy
Mon Jul 14 09:11:27 EDT 1997