Important: The information in this document is obsolete and should not be used for new development.
PBGetWDInfo
You can use thePBGetWDInfo
function to get information about a working directory.
FUNCTION PBGetWDInfo (paramBlock: WDPBPtr; async: Boolean): OSErr;
paramBlock
- A pointer to a working directory parameter block.
async
- A Boolean value that specifies asynchronous (
TRUE) or synchronous (FALSE) execution.
--> ioCompletion
ProcPtr
A pointer to a completion routine. <-- ioResult
OSErr
The result code of the function. <-- ioNamePtr
StringPtr
A pointer to a pathname. <-> ioVRefNum
Integer
A volume specification. --> ioWDIndex
Integer
An index. <-> ioWDProcID
LongInt
The working directory user identifier. <-> ioWDVRefNum
Integer
The volume reference number for the working directory. <-- ioWDDirID
LongInt
The working directory's directory ID. DESCRIPTION
ThePBGetWDInfo
function returns information about the specified working directory. The working directory can be specified either by its working directory reference number inioVRefNum
(in which case the value ofioWDIndex
should be 0), or by its index number inioWDIndex
. In the latter case, if the value ofioVRefNum
is not 0, it's interpreted as a volume specification, and only working directories on that volume
are indexed.The
ioWDVRefNum
field always returns the volume reference number. TheioVRefNum
field contains a working directory reference number when a working directory reference number is passed in that field; otherwise, it returns a volume reference number.PBGetWDInfo
returns a pointer to the volume's name in theioNamePtr
field. You should pass a pointer to aStr31
value if you want that name returned. If you passNIL
in theioNamePtr
field, no volume name is returned.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forPBGetWDInfo
are
Trap macro Selector _HFSDispatch $0007 RESULT CODES
noErr 0 No error nsvErr -35 No such volume rfNumErr -51 Bad working directory reference number