Creator code

Last updated
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 (
.mw-parser-output .monospaced{font-family:monospace,monospace}
MP3), but with four different creator codes:
Audn (Audion),
hook (iTunes),
SCPL (SoundApp) and
NSWa (Winamp). Mac OS window with four different MP3 files.png
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 (MP3), but with four different creator codes: Audn (Audion), hook (iTunes), SCPL (SoundApp) and NSWa (Winamp).

A creator code is a mechanism introduced in the classic Mac OS to link a data file to the application program 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 extensions in other operating systems.

Contents

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 representation formed a word or acronym. For example, the creator code of the HyperCard application and its associated "stacks" is represented in ASCII as WILD. Occasionally they represented inside jokes. For instance, the Marathon computer game had a creator code of 26.2 (the approximate length, in miles, of a marathon) and Marathon 2: Durandal had a creator code of 52.4.

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. 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 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, 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. [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

Related Research Articles

Cocoa is Apple's native object-oriented application programming interface (API) for its desktop operating system macOS.

The resource fork is a fork or section of a file on Apple's classic Mac OS operating system, which was also carried over to the modern macOS for compatibility, used to store structured data along with the unstructured data stored within the data fork.

A text file is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists stored as data within a computer file system. In operating systems such as CP/M and MS-DOS, where the operating system does not keep track of the file size in bytes, the end of a text file is denoted by placing one or more special characters, known as an end-of-file marker, as padding after the last line in a text file. On modern operating systems such as Microsoft Windows and Unix-like systems, text files do not contain any special EOF character, because file systems on those operating systems keep track of the file size in bytes. There are for most text files a need to have end-of-line delimiters, which are done in a few different ways depending on operating system. Some operating systems with record-orientated file systems may not use new line delimiters and will primarily store text files with lines separated as fixed or variable length records.

In computing, an icon is a pictogram or ideogram displayed on a computer screen in order to help the user navigate a computer system. The icon itself is a quickly comprehensible symbol of a software tool, function, or a data file, accessible on the system and is more like a traffic sign than a detailed illustration of the actual entity it represents. It can serve as an electronic hyperlink or file shortcut to access the program or data. The user can activate an icon using a mouse, pointer, finger, or recently voice commands. Their placement on the screen, also in relation to other icons, may provide further information to the user about their usage. In activating an icon, the user can move directly into and out of the identified function without knowing anything further about the location or requirements of the file or code.

A taskbar is an element of a graphical user interface which has various purposes. It typically shows which programs are currently running.

In classic Mac OS System 7 and later, and in macOS, an alias is a small file that represents another object in a local, remote, or removable file system and provides a dynamic link to it; the target object may be moved or renamed, and the alias will still link to it. In Windows, a "shortcut", a file with a .lnk extension, performs a similar function.

Spotlight (software) system-wide desktop search feature of Apples OS X operating system

Spotlight is a system-wide desktop search feature of Apple's macOS and iOS operating systems. Spotlight is a selection-based search system, which creates an index of all items and files on the system. It is designed to allow the user to quickly locate a wide variety of items on the computer, including documents, pictures, music, applications, and System Preferences. In addition, specific words in documents and in web pages in a web browser's history or bookmarks can be searched. It also allows the user to narrow down searches with creation dates, modification dates, sizes, types and other attributes. Spotlight also offers quick access to definitions from the built-in New Oxford American Dictionary and to calculator functionality. There are also command-line tools to perform functions such as Spotlight searches.

A FourCC is a sequence of four bytes used to uniquely identify data formats. It originated from the OSType or ResType metadata system used in classic Mac OS and was adopted for the Amiga/Electronic Arts Interchange File Format and derivatives. The idea was later reused to identify compressed data types in QuickTime and DirectShow.

Dashboard (macOS) macOS dashboard system featuring programmable widgets

Dashboard was an application for Apple Inc.'s macOS operating systems, used as a secondary desktop for hosting mini-applications known as widgets. These are intended to be simple applications that do not take time to launch. Dashboard applications supplied with macOS include a stock ticker, weather report, calculator and notepad; users can create or download their own.

Mac OS X Leopard Sixth major release of OS X

Mac OS X Leopard is the sixth major release of Mac OS X, Apple's desktop and server operating system for Macintosh computers. Leopard was released on October 26, 2007 as the successor of Mac OS X 10.4 Tiger, and is available in two editions: a desktop version suitable for personal computers, and a server version, Mac OS X Server. It retailed for $129 for the desktop version and $499 for Server. Leopard was superseded by Snow Leopard. Leopard is the final version of macOS to support the PowerPC architecture as Snow Leopard functions solely on Intel based Macs.

In the macOS, iOS, NeXTSTEP, and GNUstep programming frameworks, property list files are files that store serialized objects. Property list files use the filename extension .plist, and thus are often referred to as p-list files.

An application directory is a grouping of software code, help files and resources that together comprise a complete software package but are presented to the user as a single object.

The Apple Developer Tools are a suite of software tools from Apple to aid in making software dynamic titles for the macOS and iOS platforms. The developer tools were formerly included on macOS install media, but are now exclusively distributed over the Internet. As of macOS 10.12, Xcode is available as a free download from the Mac App Store.

Spaces (software)

Spaces was a virtual desktop feature of Mac OS X, introduced in Mac OS X 10.5 Leopard. It was announced by Steve Jobs during the opening keynote at the Worldwide Developers Conference on August 7, 2006. As of Mac OS X 10.7 Lion, it has been incorporated into Mission Control.

A Uniform Type Identifier (UTI) is a text string used on software provided by Apple Inc. to uniquely identify a given class or type of item. Apple provides built-in UTIs to identify common system objects – document or image file types, folders and application bundles, streaming data, clipping data, movie data – and allows third party developers to add their own UTIs for application-specific or proprietary uses. Support for UTIs was added in the Mac OS X 10.4 operating system, integrated into the Spotlight desktop search technology, which uses UTIs to categorize documents. One of the primary design goals of UTIs was to eliminate the ambiguities and problems associated with inferring a file's content from its MIME type, filename extension, or type or creator code.

Workbench (AmigaOS) Graphical user interface for the Amiga computer

Workbench is the graphical file manager of AmigaOS developed by Commodore International for their Amiga line of computers. Workbench provides the user with a graphical interface to work with file systems and launch applications. It uses a workbench metaphor for representing file system organisation.

Hunk is the executable file format of tools and programs of the Amiga Operating System based on Motorola 68000 CPU and other processors of the same family. This kind of executable got its name from the fact that the software programmed on Amiga is divided in its internal structure into many pieces called hunks, in which every portion could contain either code or data.

A file format is a standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. File formats may be either proprietary or free and may be either unpublished or open.

Classic Mac OS original operating system of Apple Mac (1984–2001)

Classic Mac OS refers to the series of operating systems developed for the Macintosh family of personal computers by Apple Inc. from 1984 to 2001, starting with System 1 and ending with Mac OS 9. The Macintosh operating system is credited with having popularized the graphical user interface concept. It was included with every Macintosh that was sold during the era in which it was developed, and many updates to the system software were done in conjunction with the introduction of new Macintosh systems.

References

  1. "Mac OS: Rebuilding Desktop File and icon recovery", Apple
  2. Sydow, Dan Parks (2002). Mac OSX Programming. ISBN   9780735711686.