Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!think!bloom-beacon!ht!spt!gz From: gz@spt.entity.com (Gail Zacharias) Newsgroups: comp.sys.mac.programmer Subject: Re: Ref numbers to pathnames?? Keywords: File Manager, file pathnames Message-ID: <184@spt.entity.com> Date: 30 Aug 88 20:52:31 GMT References: <553@utacs.UTA.FI> Reply-To: gz@entity.com (Gail Zacharias) Organization: Hacks 'R' Us, Cambridge, MA Lines: 21 In article <553@utacs.UTA.FI> jmh@utacs.UUCP (Juha-Matti Heimonen) writes: >Sorry, if I am asking silly questions, but I still would like to know >how can I get the full pathname of a file that has been selected using >SFGetFile or SFPutFile. Ok, here's how I do it: (defun full-directory-name (vrefnum &optional (dirid 0)) (rlet ((pb :CinfoPB) (name (:string 255))) (rset pb CinfoPB.ioFileName name) (rset pb CinfoPB.ioVRefNum vrefnum) (rset pb CinfoPB.ioDrDirID dirid) (rset pb CinfoPB.ioFDirIndex -1) (do ((dir "" (concatenate 'string (%get-string name) ":" dir))) ((not (zerop (_GetCatInfo :a0 pb :d0))) dir) (rset pb CinfoPB.ioDrDirID (rref pb CinfoPB.ioDrParID))))) Hope this helps :-) -- gz@entity.com ...!mit-eddie!spt!gz Now let's all repeat the non-conformist oath.