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 Volume Access Routines / Manipulating the Default Volume


PBSetVol

You can change the default volume and default directory using the PBSetVol function.

FUNCTION PBSetVol (paramBlock: ParmBlkPtr; async: Boolean): OSErr;
paramBlock
A pointer to a basic File Manager 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.
-->ioNamePtrStringPtrA pointer to a pathname.
-->ioVRefNumIntegerA volume reference number or a working directory reference number.

DESCRIPTION
If you pass a volume reference number in ioVRefNum, the PBSetVol function makes the specified volume the default volume and the root directory of that volume the default directory. If you pass a working directory reference number, PBSetVol makes the specified directory the default directory, and the volume containing that directory
the default volume.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro for PBSetVol is _SetVol.

RESULT CODES
noErr0No error
nsvErr-35No such volume
bdNamErr-37Bad volume name
paramErr-50No default volume

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996