home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.lisp
- Path: sparky!uunet!stanford.edu!lucid.com!karoshi!york
- From: york@oakland-hills.lucid.com (Bill York)
- Subject: Re: changing the pathname type
- In-Reply-To: haltraet@monsun.si.no's message of Mon, 14 Sep 1992 08:12:47 GMT
- Message-ID: <YORK.92Sep14111244@oakland-hills.lucid.com>
- Sender: usenet@lucid.com
- Reply-To: York@Lucid.COM
- Organization: Lucid, Inc.
- References: <HALTRAET.92Sep14091247@monsun.si.no>
- Date: 14 Sep 92 11:12:44
- Lines: 19
-
- In article <HALTRAET.92Sep14091247@monsun.si.no> haltraet@monsun.si.no (Hallvard Tr{tteberg) writes:
-
- I would like to change the filetype of a pathname (e.g. to nil
- (unspecified) or .lisp). There is no (setf pathname-type) in my lisp,
- nor is it mentioned in CLtL, although pathname-type is called an
- accessor. I cannot use (merge-pathnames <filename> ".lisp") since this
- will only "change" the pathname-type if it is nil (unspecified). I
- cannot merge the other way, i.e. (merge-pathnames ".lisp" <filename>)
- since I would like to use nil (unspecified) instead of ".lisp". I want
- to avoid doing string-search since it would likely be non-portable.
-
- You can use make-pathname, specifying the type explicitly and
- defaulting everything else from the original pathname.
-
- > (make-pathname :type nil :defaults #P"/foo/bar.lisp")
- #P"/foo/bar"
- > (pathname-type *)
- NIL
- >
-