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
Low-Level HFS Routines / Maintaining Working Directories


PBGetWDInfo

You can use the PBGetWDInfo 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.
-->ioCompletionProcPtrA pointer to a completion routine.
<--ioResultOSErrThe result code of the function.
<--ioNamePtr StringPtrA pointer to a pathname.
<->ioVRefNumIntegerA volume specification.
-->ioWDIndexIntegerAn index.
<->ioWDProcIDLongIntThe working directory user identifier.
<->ioWDVRefNumIntegerThe volume reference number for the working directory.
<--ioWDDirIDLongIntThe working directory's directory ID.

DESCRIPTION
The PBGetWDInfo function returns information about the specified working directory. The working directory can be specified either by its working directory reference number in ioVRefNum (in which case the value of ioWDIndex should be 0), or by its index number in ioWDIndex. In the latter case, if the value of ioVRefNum 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. The ioVRefNum 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 the ioNamePtr field. You should pass a pointer to a Str31 value if you want that name returned. If you pass NIL in the ioNamePtr field, no volume name is returned.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for PBGetWDInfo are
Trap macroSelector
_HFSDispatch$0007

RESULT CODES
noErr0No error
nsvErr-35No such volume
rfNumErr-51Bad working directory reference number

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996