Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 2 - File Manager / File Manager Reference
Data Structures


Working Directory Parameter Blocks

The low-level HFS functions PBOpenWD, PBCloseWD, and PBGetWDInfo use the working directory parameter block defined by the WDPBRec data type.

TYPE WDPBRec      =           {working directory parameter block}
RECORD
   qLink:         QElemPtr;   {next queue entry}
   qType:         Integer;    {queue type}
   ioTrap:        Integer;    {routine trap}
   ioCmdAddr:     Ptr;        {routine address}
   ioCompletion:  ProcPtr;    {pointer to completion routine}
   ioResult:      OSErr;      {result code}
   ioNamePtr:     StringPtr;  {pointer to pathname}
   ioVRefNum:     Integer;    {volume specification}
   filler1:       Integer;    {reserved}
   ioWDIndex:     Integer;    {working directory index}
   ioWDProcID:    LongInt;    {working directory user identifier}
   ioWDVRefNum:   Integer;    {working directory's vol. ref. num.}
   filler2:       ARRAY[1..7] OF Integer; {reserved}
   ioWDDirID:     LongInt;    {working directory's directory ID}
END;
Field Description
qLink
A pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.)
qType
The queue type. (This field is used internally by the File Manager.)
ioTrap
The trap number of the routine that was called. (This field is used internally by the File Manager.)
ioCmdAddr
The address of the routine that was called. (This field is used internally by the File Manager.)
ioCompletion
A pointer to a completion routine to be executed at the end of an asynchronous call. It should be NIL for asynchronous calls with
no completion routine and is automatically set to NIL for all synchronous calls. See "Completion Routines" on page 2-238 for information about completion routines.
ioResult
The result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field; it's set to a positive number when
the call is made and receives the actual result code when the call
is completed.
ioNamePtr
A pointer to a pathname. Whenever a routine description specifies that ioNamePtr is used--whether for input, output, or both--
it's very important that you set this field to point to storage for a Str255 value (if you're using a pathname) or to NIL (if you're not).
ioVRefNum
A volume specification (volume reference number, working directory reference number, drive number, or 0 for default volume).
filler1
Reserved.
ioWDIndex
An index for use with the PBGetWDInfo function.
ioWDProcID
An identifier that's used to distinguish between working directories set up by different users; you should set ioWDProcID to your application's signature.
ioWDVRefNum
The working directory's volume reference number.
filler2
Reserved.
ioWDDirID
The working directory's directory ID.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996