In terms of display, naming is everything. The Finder is responsible for selecting the way a directory appears: as a normal folder, as a file, or as an application. A file’s name, particularly its underlying file extension (.app), tells the Finder which kind of presentation to use. Here’s a quick-and-dirty way to test this behavior out for yourself.
In the Finder, choose File → New Folder (Shift-⌘-N). Give the folder a simple name (e.g., Chuck), as shown in Figure 2-3.
Figure 2-3. A normal Mac OS X folder.
Add a file to the folder, so that there’s at least one item inside.
Single-click on the folder’s name; the name will be highlighted in light blue. Hit the Right Arrow (or Down Arrow) key to move the cursor to the end of the folder’s name, and then add a .bundle extension to the folder (e.g., Chuck.bundle). Finder accepts the update and changes to use a generic file icon, as shown in Figure 2-4.
Figure 2-4. A folder using a .bundle extension looks like a single document.
Select the folder and choose File → Open (or double-click the renamed icon). An alert appears, telling you that there’s no default application specified to open your “document”