Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!apple!apple.com!chewy From: chewy@apple.com (Paul Snively) Newsgroups: comp.sys.mac.programmer Subject: Re: Keeping track of files Message-ID: <4436@internal.Apple.COM> Date: 28 Sep 89 16:36:11 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 26 References:<5875@viscous.sco.COM> <17768@pasteur.Berkeley.EDU> In article <17768@pasteur.Berkeley.EDU> mcelhoe@cory.Berkeley.EDU (Glenn McElhoe) writes: > In article <5875@viscous.sco.COM> jamesm@sco.COM (James M. Moore) writes: > > > >I'm writing an application where I'd like to keep track of file locations > >after a reboot. I assume that keeping track of the volume reference > >number returned from SFGetFile isn't enough, as it's subject to change > >across reboots. What should I use in addition to the file name? > > The 'vrefnum' that you get from SFGetFile is actually (under HFS) a > working directory reference number, and will change when the working > directory is closed (e.g. when you turn your machine off). Anyway, what > you need to save are the real volume reference number, the DirID, and the > name of the file. Oops--wrongo. The vRefNum for a volume isn't constant, either; it depends upon when the file system "sees" it. What you REALLY need are the NAME of the volume (ack! pfffft!), the dirID, and the name of the file. The "how you get them" stuff still applies, though. __________________________________________________________________________ Just because I work for Apple Computer, Inc. doesn't mean that they believe what I believe or vice-versa. __________________________________________________________________________