Subject: Re: A portable DIRECTORY-P. Re: Here we go again. More CMUCL/ACL pathname differences.
From: Erik Naggum <>
Date: 1999/01/13
Newsgroups: comp.lang.lisp
Message-ID: <>

| Instead of introducing OS dependence (with all those #+ delimiters), I'd
| rather parse the namestring, then, if the filename+filetype components
| are not empty, would make a new pathname object with file{name,type} nil
| and the original file{name,type} appended to the pathname-directory list.

  that was _almost_ code.

(defun pathname-as-directory (pathname)
  (setq pathname (pathname pathname))
  (let ((filename (file-namestring pathname)))
    (if filename
      (make-pathname :defaults pathname
		     :directory (append (pathname-directory pathname)
					(list filename))
		     :name nil :type nil :version nil)