Important: The information in this document is obsolete and should not be used for new development.
File Information Record
You typically set a file's type and creator when you create the file; for example, you pass a creator and a file type to the File Manager functionFSpCreate
as parameters. The Finder manipulates the other fields in the file information record, which is a data structure of typeFInfo
. After you have created a file, you can use the File Manager functionFSpGetFInfo
to return the file information record, then change thefdType
andfdCreator
fields by using the File Manager functionFSpSetFInfo
.
TYPE FInfo = RECORD fdType: OSType; {file type} fdCreator: OSType; {file creator} fdFlags: Integer; {Finder flags} fdLocation: Point; {file's location in window} fdFldr: Integer; {window that contains file} END;
Field Description
fdType
- File type. For a discussion of file types, see "Giving a Signature to Your Application and a Creator and a File Type to Your Documents" beginning on page 7-7.
fdCreator
- The signature of the application that created the file. For a discussion about creators, see "Giving a Signature to Your Application and a Creator and a File Type to Your Documents" beginning on page 7-7.
fdFlags
- Finder flags. There are only a few flags that your application might ever need to set; these are described in "Using Finder Information in the Catalog File" beginning on page 7-30. All of the Finder flags are listed here for completeness.
- You can use these constants as masks for these flags:
CONST fHasBundle = 8192; {set if file has a bundle } { resource} fInvisible = 16384; {set if icon is invisible} kIsOnDesk = $1; {unused and reserved in } { System 7} kColor = $E; {three bits of color } { coding} kIsShared = $40; {file can be executed by } { multiple users } { simultaneously} kHasBeenInited = $100; {file info is in desktop } { database} kHasCustomIcon = $400; {file or directory has a } { customized icon} kIsStationery = $800; {file is a stationery pad} kNameLocked = $1000; {file or directory can't } { be renamed from Finder, } { and icon can't be } { changed} kHasBundle = $2000; {file has bundle resource} kIsInvisible= $4000; {file or directory is } { invisible from Finder & } { from Standard File } { Package dialog boxes} kIsAlias = $8000; {file is an alias file}
fdLocation
- The location--specified in coordinates local to the window--of the file's icon within its window.
fdFldr
- The window in which the file's icon appears; this information is meaningful only to the Finder.