image

Glossary: Bundle

image

A bundle (or package) is a file system entity in Mac OS X whose key characteristic is that although it is a folder, it is portrayed in the Finder as a file. Bundles are useful because they can contain files and folders inside them which the user doesn’t see or even know about. In fact, the user is generally unconscious of the fact that a bundle is a bundle. Just to give a simple example, a Mac OS X-native application is a bundle.

Opening a bundle in the Finder by double-clicking it is like opening an application or document — not like opening a folder. If you want to open a bundle as a folder, Control-click the bundle in the Finder, and choose Show Package Contents from the contextual menu.

Inside a compiled script bundle or application, when you Show Package Contents, is a Contents folder. Inside that is a Resources folder. That is where you can keep additional files that need to travel with the bundle. The bundle inspector shows the contents of the Resources folder.

Do not directly touch any of the other files and folders inside the Resources folder, or disturb anything else in the bundle. Doing so can destroy the viability of the bundle.

A a compiled script bundle or application can refer to a file inside its Resources folder using the path to resource scripting addition command.



Glossary: Bytecode
image