This articlemay containoriginal research. Pleaseimprove it byverifying the claims made and addinginline citations. Statements consisting only of original research should be removed.(January 2019) (Learn how and when to remove this message) |

Acreator code is a mechanism introduced in theclassic Mac OS to link a data file to theapplication program which created it. The similartype 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) thefile extensions in other operating systems.
Creator codes are four-byteOSTypes. 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 theirASCII representation formed a word or acronym. For example, the creator code of theHyperCard application and its associated "stacks" is represented inASCII asWILD, from the application's original name of WildCard. Occasionally they representedinside jokes. For instance, theMarathon computer game had a creator code of26.2 (the approximate length, in miles, of amarathon) andMarathon 2: Durandal had a creator code of52.4.
The binding are stored inside theresource fork of the application asBNDL andfref resources. These resources maintained the creator code as well as the association with eachtype code andicon. 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 fordouble 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 withMac OS X Snow Leopard, creator codes are ignored by the operating system. Creator codes have been internally superseded by Apple'sUniform 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 toolsGetFileInfo andSetFile which are installed as part of the developer tools into/Developer/Tools.
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