# Creator code

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Creator_code
> Markdown URL: https://mediated.wiki/source/Creator_code.md
> Source: https://en.wikipedia.org/wiki/Creator_code
> Source revision: 1343065365
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

This article may contain original research. Please improve it by verifying the claims made and adding inline citations. Statements consisting only of original research should be removed. (January 2019) (Learn how and when to remove this message)

The creator code is responsible for linking the file and the program that will launch when the file is double-clicked. This Mac OS window show four files of the same [type code](/source/Type_code) (MP3), but with four different creator codes: Audn ([Audion](/source/Audion_(software))), hook ([iTunes](/source/ITunes)), SCPL ([SoundApp](/source/SoundApp)) and NSWa ([Winamp](/source/Winamp)).

A **creator code** is a mechanism introduced in the [classic Mac OS](/source/Classic_Mac_OS) to link a data file to the [application program](/source/Software) which created it. The similar [type code](/source/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 extensions](/source/File_extension) in other operating systems.

Creator codes are four-byte [OSTypes](/source/OSType). 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](/source/ASCII) representation formed a word or acronym. For example, the creator code of the [HyperCard](/source/HyperCard) application and its associated "stacks" is represented in [ASCII](/source/ASCII) as WILD, from the application's original name of WildCard. Occasionally they represented [inside jokes](/source/Inside_joke). For instance, the *[Marathon](/source/Marathon_(1994_video_game))* computer game had a creator code of 26.2 (the approximate length, in miles, of a [marathon](/source/Marathon)) and *[Marathon 2: Durandal](/source/Marathon_2%3A_Durandal)* had a creator code of 52.4.

The binding are stored inside the [resource fork](/source/Resource_fork) of the application as [BNDL](https://en.wikipedia.org/w/index.php?title=BNDL&action=edit&redlink=1) and [fref](https://en.wikipedia.org/w/index.php?title=Fref&action=edit&redlink=1) resources. These resources maintained the creator code as well as the association with each [type code](/source/Type_code) and [icon](/source/Icon_(computing)). 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."[1]

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](/source/Double_click) 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](/source/Mac_OS_X_Snow_Leopard), creator codes are ignored by the operating system. Creator codes have been internally superseded by Apple's [Uniform Type Identifier](/source/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.[2] 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](/source/Type_code)

- [Uniform Type Identifier](/source/Uniform_Type_Identifier)

## References

1. **[^](#cite_ref-1)** ["Mac OS: Rebuilding Desktop File and icon recovery"](http://support.apple.com/kb/HT2344?viewlocale=en_US&locale=en_US), Apple

1. **[^](#cite_ref-2)** Sydow, Dan Parks (2002). [*Mac OSX Programming*](https://books.google.com/books?id=p3waZFMr97IC&pg=PA287). New Riders. [ISBN](/source/ISBN_(identifier)) [9780735711686](https://en.wikipedia.org/wiki/Special:BookSources/9780735711686).

## External links

- [How application binding policy changed in Snow Leopard](https://arstechnica.com/staff/fatbits/2009/09/metadata-madness.ars)

- Szekely, Ilan (Aug 2003). ["Type/Creator Database"](http://www.lacikam.co.il/tcdb/) (Excel). Retrieved 2017-02-11. The developer acknowledges that since the information was manually accumulated from various sources, some not registered with Apple, from various apps and their files, validity is NOT guaranteed

v t e Classic Mac OS Versions System 1 System 2, 3, and 4 System 5 System 6 System 7 Mac OS 7 Mac OS 8 Mac OS 9 Applications Calculator Chooser Drive Setup DVD Player Finder Graphing Calculator Keychain Access PictureViewer PowerTalk QuickTime Player Network Browser Scrapbook Sherlock Software Update Stickies System Information SimpleText Developer HyperCard MacsBug Macintosh Programmer's Workshop ResEdit Technology Alias Appearance Manager Apple menu At Ease Balloon help Bomb error Command key (⌘) Control Panel Control Strip Creator code Dogcow Extensions Hierarchical File System HFS Plus Keychain Labels Macintosh File System Macintosh Toolbox Managers MultiFinder Multiprocessing Services Option key (⌥) OSType PICT QuickDraw QuickTime Resource fork Sosumi sound Startup sequence System folder System suitcase Type code WorldScript Related articles Memory management Old World ROM New World ROM Software Transition to PowerPC

---
Adapted from the Wikipedia article [Creator code](https://en.wikipedia.org/wiki/Creator_code) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Creator_code?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
