A creator code is a mechanism introduced in the
classic Mac OS
Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Macintosh family of personal computers by Apple Computer from 1984 to 2001, starting with System 1 and ending with Mac OS 9. Th ...
to link a data file to the
application program
Application may refer to:
Mathematics and computing
* Application software, computer software designed to help the user to perform specific tasks
** Application layer, an abstraction layer that specifies protocols and interface methods used in a ...
which created it. The similar
type code held the file type, like "TEXT". Together, the type and creator indicated what application should be used to open a file, similar to (but richer than) the
file extension
A filename extension, file name extension or file extension is a suffix to the name of a computer file (e.g., .txt, .docx, .md). The extension indicates a characteristic of the file contents or its intended use. A filename extension is typically ...
s in other operating systems.
Creator codes are four-byte
OSTypes. They allow applications to launch and open a file whenever any of their associated files is double-clicked. Creator codes could be any four-byte value, but were usually chosen so that their
ASCII
ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
representation formed a word or acronym. For example, the creator code of the
HyperCard
HyperCard is a software application and development kit for Apple Macintosh and Apple IIGS computers. It is among the first successful hypermedia systems predating the World Wide Web.
HyperCard combines a flat-file database with a graphical, ...
application and its associated "stacks" is represented in
ASCII
ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
as , from the application's original name of WildCard. Occasionally they represented
inside jokes. For instance, the ''
Marathon
The marathon is a long-distance foot race with a distance of , usually run as a road race, but the distance can be covered on trail routes. The marathon can be completed by running or with a run/walk strategy. There are also wheelchair di ...
'' computer game had a creator code of (the approximate length, in miles, of a
marathon
The marathon is a long-distance foot race with a distance of , usually run as a road race, but the distance can be covered on trail routes. The marathon can be completed by running or with a run/walk strategy. There are also wheelchair di ...
) and ''
Marathon 2: Durandal'' had a creator code of .
The binding are stored inside the
resource fork of the application as
BNDL and
fref resources. These resources maintained the creator code as well as the association with each
type code and
icon
An icon () is a religious work of art, most commonly a painting, in the cultures of the Eastern Orthodox, Oriental Orthodox, and Catholic churches. They are not simply artworks; "an icon is a sacred image used in religious devotion". The most c ...
. The OS collected this data from the files when they were copied between mediums, thereby building up the list of associations and icons as software was installed onto the machine. Periodically this "desktop database" would become corrupted, and had to be fixed by "rebuilding the desktop database."
The key difference between extensions and Apple's system is that file type and file ownership bindings are kept distinct. This allows files to be written of the same type - TEXT say - by different applications. Although any application can open anyone else's TEXT file, by default, opening the file will open the original application that created it. With the extensions approach, this distinction is lost - all files with a .txt extension will be mapped to a single text editing application of the user's choosing. A more obvious advantage of this approach is allowing for
double click
A double-click is the act of pressing a computer mouse button twice quickly without moving the mouse. Double-clicking allows two different actions to be associated with the same mouse button. It was developed by Bill Atkinson of Apple Computer (n ...
launching of specialized editors for more complex but common file types, like .csv or .html. This can also represent a disadvantage as in the illustration above, where double clicking the four mp3 files would launch and play the files in four different music applications instead of queuing them in the user's preferred player application.
macOS retains creator codes, but supports extensions as well. However, beginning with
Mac OS X Snow Leopard
Mac OS X Snow Leopard (version 10.6) is the seventh major release of macOS, Apple's desktop and server operating system for Macintosh computers.
Snow Leopard was publicly unveiled on June 8, 2009 at Appleās Worldwide Developers Conferen ...
, creator codes are ignored by the operating system. Creator codes have been internally superseded by Apple's
Uniform Type Identifier scheme, which manages application and file type identification as well as type codes, creator codes and file extensions.
To avoid conflicts, Apple maintained a database of creator codes in use. Developers could fill out an online form to register their codes.
Apple reserves codes containing all lower-case ASCII characters for its own use.
Creator codes are not readily accessible for users to manipulate, although they can be viewed and changed with certain software, most notably the macOS command line tools ''GetFileInfo'' and ''SetFile'' which are installed as part of the developer tools into ''/Developer/Tools''.
See also
*
Type code
*
Uniform Type Identifier
References
External links
How application binding policy changed in Snow Leopard*
{{Mac OS
Macintosh operating systems
Metadata