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


SetVol

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

FUNCTION SetVol (volName: StringPtr; vRefNum: Integer): OSErr;
volName
A pointer to the name of a mounted volume.
vRefNum
A volume reference number or a working directory reference number.
DESCRIPTION
The SetVol function sets the default volume and directory to the values specified in the volName and vRefNum parameters. If you pass a volume reference number in vRefNum or a pointer to a volume name in volName, SetVol 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 in vRefNum, SetVol makes the specified directory the default directory, and the volume containing that directory the default volume.

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