🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #20756

Re: Getting a vRefNum from a DirID

#20756
From: Raymond Lau
Date: Sun, 25 Oct 1987 17:08
13 lines
1242 bytes
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.
Technical Details
Message-ID: <1803@dasys1.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!necntc!ames!ptsfa!hoptoad!dasys1!raylau
References: <1006@mntgfx.MENTOR.COM>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!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