Important: The information in this document is obsolete and should not be used for new development.
The Desktop Database
For quick access to the resources it needs, the Finder maintains a central desktop database of information about the files and directories on a volume. The Finder
updates the database when applications are added, moved, renamed, or deleted.Normally, your application won't need to use the information in the desktop database
or to use Desktop Manager routines to manipulate it. Instead, your application should let the Finder manipulate the desktop database and handle such Desktop Manager tasks as launching applications when users double-click icons, maintaining user comments associated with files, and managing the icons used by applications.In case you discover some important need to retrieve information from the desktop database or even to change the desktop database from within your application, Desktop Manager routines are provided for you to do so. While your application probably won't ever need to use them, for the sake of completeness they are described in Inside Macintosh: More Macintosh Toolbox.
Much of the information in the desktop database comes from the bundle resources
for applications and other files on the volume. (See "Using Finder Information in the Catalog File" beginning on page 7-30 for a discussion on setting the bundle bit of an application so that its bundled resources get stored in the desktop database.) The desktop database contains all icon definitions and their associated file types. It lists all the file types that each application can open and all copies or versions of the application that's listed as the creator of a file. The desktop database also lists the location of each application on the disk and any comments that the user has added to the information windows for desktop objects.The Finder maintains a desktop database for each volume with a capacity greater than
2 MB. For most volumes, such as hard disks, the database is stored on the volume itself. For read-only volumes--such as some compact discs--that don't contain their own desktop database, the Desktop Manager creates it and stores it in the System Folder of the startup drive.For compatibility with older versions of system software, the Finder keeps the information for ejectable volumes with a capacity smaller than 2 MB in a resource file instead of a database.