Path: utzoo!attcan!uunet!husc6!cmcl2!nrl-cmf!ames!amdahl!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: Full path name of a file Message-ID: <10241@apple.Apple.Com> Date: 16 May 88 22:54:53 GMT References: <2532@chalmers.UUCP> <301@piring.cwi.nl> <304@piring.cwi.nl> <6464@cit-vax.Caltech.Edu> Reply-To: lsr@apple.UUCP (Larry Rosenstein) Organization: Advanced Technology Group, Apple Computer Lines: 24 In article <6464@cit-vax.Caltech.Edu> wetter@tybalt.caltech.edu.UUCP (Pierce T. Wetter) writes: > > Two ways to do this: If you can't find the file put up an sfgetfile box >and ask the user where it is. Then save the pathname in a str resource. If its >longer then 255 bytes, your application will just keep making the user find >it each time. The problem with saving a pathname is that it is very easy for the user to change one folder along the path. An alternative is to save the dirID of the folder. The dirID is unique and won't change unless the disk is reformatted, which is hopefully less often than a folder changes name. If you can't find the file, then put up the sfgetfile box. (The program might first look in some standard places such as the same folder as the application and the system folder.) (I have heard that some implementations of AppleTalk Filing Protocol on non-Macs don't save unique dirIDs on the server. They create dirIDs as needed, and these are only valid as long as you are logged in. If this is true, then my idea won't work well to locate files on those kinds of servers.) -- Larry Rosenstein, Object Specialist Apple Computer, Inc. 20525 Mariani Ave, MS 27-AJ Cupertino, CA 95014 AppleLink:Rosenstein1 domain:lsr@Apple.COM UUCP:{sun,voder,nsc,decwrl}!apple!lsr