[comp.sys.mac.programmer] vRefNum

ml10+@andrew.cmu.edu (Michael A. Libes) (11/03/89)

I have a question about low-level File routines.

   My progam is supposed to store a file for later reference.  I tried
saving the file name and volume reference number.  However, when the
program is run the second time, the actual volume reference number of
the file has changed.  (I think the value is dynamic during the run of a
program).
   After reading IM IV, I figured that the Directory ID wouldn't change
so I stored that instead of the VRefNum.  This creates a new problem.  A
call to PBHGetCatInfo will convert a fileName/VRefNum to a dirID but not
vica versa.  How can I get the current VRefNum from a fileName/dirID?

    -luni

russotto@eng.umd.edu (Matthew T. Russotto) (11/03/89)

In article <sZI=N8S00Uh741p3Ar@andrew.cmu.edu> ml10+@andrew.cmu.edu (Michael A. Libes) writes:
You need to save 3 things:  File name, Volume NAME, DirID.
The file name you get from SFGetFile.  Calling PBGetWDInfo will get
you the real Volume Reference Number as well as the directory ID.  Call
PBGetVInfo on the real volume reference number, and in ionameptr you get
the volume name.
--
Matthew T. Russotto	russotto@eng.umd.edu	russotto@wam.umd.edu
rrn: newsgroup "junk" full --- rerouting to news.groups