Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!necntc!ames!ptsfa!hoptoad!dasys1!raylau From: raylau@dasys1.UUCP (Raymond Lau) Newsgroups: comp.sys.mac Subject: Re: Getting a vRefNum from a DirID Message-ID: <1803@dasys1.UUCP> Date: Sun, 25-Oct-87 12:08:17 EST Article-I.D.: dasys1.1803 Posted: Sun Oct 25 12:08:17 1987 Date-Received: Wed, 28-Oct-87 00:47:23 EST References: <1006@mntgfx.MENTOR.COM> Organization: The Big Electric Cat Lines: 13 Summary: getting a WD from vol/dirID In article <1006@mntgfx.MENTOR.COM>, tomc@mntgfx.MENTOR.COM (Tom Carstensen) writes: > Put simply, how do you get a volume reference number > (like that return from a SFGetFile), from a directory > ID? The vRefNum returned by SFGetFile may actually be a volume ref num or it may be a working directory reference number. WD's were created so that pre- HFS applications can refer to folders w/one number. To create a WD given a vRefNum and a DirID, use PBOpenWD...and the Proc ID or 'ERIK' so that the Finder will dispose of unneeded WDs. (There is a limit of 40 WDs at any given time on current systems) To refer to the root of a volume (DirID}i = 2), just use the volume reference number.