From ... From: Erik Naggum Subject: Re: A portable DIRECTORY-P. Re: Here we go again. More CMUCL/ACL pathname differences. Date: 1999/01/13 Message-ID: <3125219688137231@naggum.no>#1/1 X-Deja-AN: 432107493 References: <778kqn$2b2$1@nnrp1.dejanews.com> <77bdqi$9fk$1@nnrp1.dejanews.com> <3125045622004774@naggum.no> <77e4e3$jrj$1@nnrp1.dejanews.com> <87d84lpaxr.fsf_-_@2xtreme.net> <369B59EA.1B19BD1C@harlequin.co.uk> <77htcl$cr7$1@nnrp1.dejanews.com> mail-copies-to: never Organization: Naggum Software; +47 8800 8879; http://www.naggum.no Newsgroups: comp.lang.lisp * vnikolov@poboxes.com | 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) pathname))) #:Erik