Path: utzoo!attcan!utgpu!watmath!iuvax!purdue!decwrl!wam.UMD.EDU!russotto From: russotto@wam.UMD.EDU Newsgroups: comp.sys.mac.programmer Subject: Re: HFS Help Message-ID: <8909210203.AA11172@cscwam.UMD.EDU> Date: 21 Sep 89 02:03:16 GMT References: <12562@orstcs.CS.ORST.EDU> Organization: University of Maryland, College Park Lines: 21 In article <12562@orstcs.CS.ORST.EDU> borcelf@jacobs.cs.orst.edu (Fernando Borcel) writes: >Is it [vrefnum] a reliable way to find a file? > >Thanks a lot. No. the vrefnum is dynamic, and are assigned starting at '-2' and in descending order. Use the volume name, directory ID, and file name as the most reliable way of finding a file across launches of your application. For the duration of an application, the vrefnum, dirID, and file name is safe (if the file is open, the refnum is enough). Having just the wdRefNum and file name is probably ok too, but I don't trust that. -- DISCLAIMER: Not only does the University not share my opinions, they don't want me sharing my opinions. "This 'Pnews', what does it do? Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu