The Finder treats packaged directories differently than other directories. Instead of displaying the contents of the packaged directory, the Finder treats it as if it were a single file. Hiding the directory's contents prevents casual users from making changes that might damage the package contents. For example, rearranging or deleting resources from an application package might prevent the application from running correctly.
Most bundles are also packages. In particular, applications and plug-ins are typically delivered as packages and thus appear to the user as a single file. Some bundles, such as frameworks, are not delivered as packages. In the case of frameworks, this is done so that the user can browse the contents of the framework; in particular, it lets the user look at the framework header files.
Even though packages are treated as opaque files by default, it is still possible for users to view and modify their contents. On the contextual menu for package directories is a Show Package Contents command. Selecting this command displays a new Finder window set to the top level of the package directory. The user can navigate the package's directory structure and make changes as if it were a regular directory hierarchy.
The Finder identifies packages by any of the following mechanisms:
The directory has a known extension: .app
, .bundle
, .framework
, .plugin
, .kext
, and so on.
The directory has its bundle bit set.
The directory has a known structure type indicating it is a modern or versioned bundle.
Once identified, the Finder may also modify the name of a package in any of the following ways:
If the package is an application, the Finder hides the .app
extension in most cases.
If the package supports localized display names and the user has not manually changed the package name, the Finder displays the name that matches the user’s current language settings.
The Finder hides the .app
extension most of the time. However, if an application name contains another extension, the Finder shows the .app
. extension to prevent confusion. For example, if you rename the Chess
application by adding a .mov
extension to the end of its name, the Finder displays the resulting bundle name as Chess.mov.app
to prevent users from thinking Chess.mov
is a QuickTime file.
© 2003, 2005 Apple Computer, Inc. All Rights Reserved. (Last updated: 2005-11-09)