Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!oliveb!pyramid!voder!apple!dwb From: dwb@apple.UUCP Newsgroups: comp.sys.mac Subject: Re: obtaining the full pathname of a file Message-ID: <1007@apple.UUCP> Date: Thu, 11-Jun-87 17:44:02 EDT Article-I.D.: apple.1007 Posted: Thu Jun 11 17:44:02 1987 Date-Received: Sat, 13-Jun-87 10:42:53 EDT References: <1345@batcomputer.tn.cornell.edu> Reply-To: dwb@apple.UUCP (Dave W. Berry) Organization: Apple Computer Inc., Cupertino, USA Lines: 24 In article <1345@batcomputer.tn.cornell.edu> steig@tcgould.tn.cornell.edu.UUCP (Mark J. Steiglitz) writes: >fopen() requires the pathname of the file, but SFGetFile and SFPutFile only >return the filename and the working directory reference number. How do I >obtain the pathname of the file? ... SFGetFile(where, "", NULL, 1, &types, NULL, &reply); if(!reply.good) return GetVol(NULL, &oldVol); /* save def. vol. so we can restore */ SetVol(NULL, reply.vRefNum); /* change default vol. to selected */ fp = fopen(ptocstr(reply.fName), "r"); SetVol(NULL, oldVol); /* restore original def. vol. */ if(!fp) { ... } ... -- David W. Berry dwb@well.uucp dwb@Delphi dwb@apple.com 293-0752@408.MaBell