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: Apple Guide Complete / Part 3 - Integrating Guide Files
Chapter 9 - Apple Guide API / Determining Which Guide Files Are Available
/


AGFileGetIndDB

Use the AGFileGetIndDB function to obtain the file system specification record of a guide file located in a specified folder.

OSErr AGFileGetIndDB
                     (short vRefNum, long dirID,
                      AGFileDType databaseType,
                      Boolean wantMixin,
                      short dbIndex, FSSpecType *fileSpec);
vRefNum
The volume reference number of the volume on which the guide file is located.
dirID
The directory ID of the directory where the guide file is located.
databaseType
The guide file type. Use these constants to specify the type of guide file:
           enum {
            kAGFileDBTypeAny        = 0,/*any guide file*/
            kAGFileDBTypeHelp       = 1,/*Help*/
            kAGFileDBTypeTutorial   = 2,/*Tutorial*/
            kAGFileDBTypeShortcuts  = 3,/*Shortcuts*/
            kAGFileDBTypeAbout      = 4,/*About*/
            kAGFileDBTypeOther      = 8 /*Other*/
           };
wantMixin
A flag. Specify TRUE if the desired guide file is a Mixin guide file. Specify FALSE if the guide file is not a Mixin guide file.
dbIndex
A number representing the guide file index. To access the first guide file of the specified type in the folder, set this parameter to 1. To access the second guide file of this type, specify 2, and so on.
fileSpec
A pointer to a file system specification record. On return, this parameter refers to the file system specification record for the guide file.
DESCRIPTION
The AGFileGetIndDB function returns, through its fileSpec parameter, the file system specification record for the specified guide file. You can call AGFileGetIndDB repetitively to access the file system specification record for all of the guide files in a folder. To access all of the guide files, increment the dbIndex parameter by 1, until the value of the dbIndex parameter is equal to the number of guide files of the requested type in the folder, or until the function result is nonzero.

RESULT CODES
noErr0No error
dirNFErr-12Directory not found or incomplete pathname
nsvErr-35Volume doesn't exist
SEE ALSO
After obtaining a guide file's file system specification record, you can get information about the guide file by using the functions described in "Getting Information About Guide Files" beginning on page 9-22. You can also open a guide file, as described next.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
12 JUL 1996