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: Macintosh Toolbox Essentials /
Chapter 7 - Finder Interface / Using the Finder Interface


Using Finder Information in the Catalog File

A catalog file exists on every volume to maintain relationships between the files and directories on that volume. (A volume is any storage medium formatted to contain files.) Although it's used mostly by the File Manager, the catalog file also contains information used by the Finder. The information for files is listed in file information records (data structures of type FInfo) and in extended file information records (data structures of type FXInfo). The information for directories is listed in directory information (DInfo) records and in extended (DXInfo) directory information records.

Figure 7-13 The version data in the information window

The Finder manipulates the fields in the file information, directory information, and extended directory information records; your application shouldn't have to directly check or set any of these fields.

Normally, your application sets the file type and the creator information in fields of the file's file information record when your application creates a new file; for example, the File Manager function FSpCreate (described in Inside Macintosh: Files) takes a creator and a file type as parameters. The Finder manipulates the other fields in the file information record, which is shown here:

TYPE  FInfo =
      RECORD
         fdType:     OSType;     {file type}
         fdCreator:  OSType;     {file creator}
         fdFlags:    Integer;    {Finder flags}
         fdLocation: Point;      {file's location in window}
         fdFldr:     Integer;    {directory that contains file}
      END;
After you have created a file, you can use the File Manager function FSpGetFInfo to return the file information record, then change the fdType and fdCreator fields by using the File Manager function FSpSetFInfo.

You can check the information in this record by calling the File Manager function FSpGetFInfo or PBGetCatInfo. In particular, you may want to check the file type
or creator for a file, or you may want to check or set one of your document's Finder flags. See "File Information Record" beginning on page 7-44 for a list of all the Finder flags. The only Finder flags you might ever want to set are described here:


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996