Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 1 - Introduction to File Management / File Management Reference
Volume Access Routines / Obtaining Volume Information


You can use the GetVInfo function to get information about a mounted volume.

FUNCTION GetVInfo (drvNum: Integer; volName: StringPtr; 
                     VAR vRefNum: Integer; 
                     VAR freeBytes: LongInt): OSErr;
The drive number of the volume for which information is requested.
On output, a pointer to the name of the specified volume.
The volume reference number of the specified volume.
The available space (in bytes) on the specified volume.
The GetVInfo function returns the name, volume reference number, and available space (in bytes) for the specified volume. You specify a volume by providing its drive number in the drvNum parameter. You can pass 0 in the drvNum parameter to get information about the default volume.

noErr0No error
nsvErr-35No such volume
paramErr-50No default volume

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996