Type code
Encyclopedia
A type code is the only mechanism used in pre-Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 versions of the Macintosh operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 to denote a file's format
File format
A file format is a particular way that information is encoded for storage in a computer file.Since a disk drive, or indeed any computer storage, can store only bits, the computer must have some way of converting information to 0s and 1s and vice-versa. There are different kinds of formats for...

, in a manner similar to file extensions in other operating systems. Codes are four-byte OSType
OSType
OSType is the name of a four-byte sequence commonly used as an identifier in Mac OS. While the bytes can have any value, they usually display figures characterized in software programs such as those utilized in ASCII or Mac OS Roman character sets.OSType values are used to identify file data...

s. For example, the type code for a HyperCard
HyperCard
HyperCard is an application program created by Bill Atkinson for Apple Computer, Inc. that was among the first successful hypermedia systems before the World Wide Web. It combines database capabilities with a graphical, flexible, user-modifiable interface. HyperCard also features HyperTalk, written...

 stack is STAK; the type code of any application program
Computer software
Computer software, or just software, is a collection of computer programs and related data that provide the instructions for telling a computer what to do and how to do it....

 is APPL.

Mac OS X retains type codes, but supports filename extensions as well. The deprecation of type codes (and creator code
Creator code
A creator code is a mechanism introduced in pre-Mac OS X versions of the Macintosh operating system to link a data file to the application program which created it, in a manner similar to file extensions in other operating systems. Codes are four-byte OSTypes. For example, the creator code of the...

s) over the older extension system, popularised by PDP-11
PDP-11
The PDP-11 was a series of 16-bit minicomputers sold by Digital Equipment Corporation from 1970 into the 1990s, one of a succession of products in the PDP series. The PDP-11 replaced the PDP-8 in many real-time applications, although both product lines lived in parallel for more than 10 years...

 systems (RT-11
RT-11
RT-11 was a small, single-user real-time operating system for the Digital Equipment Corporation PDP-11 family of 16-bit computers...

, RSX-11
RSX-11
RSX-11 is a family of real-time operating systems mainly for PDP-11 computers created by Digital Equipment Corporation , common in the late 1970s and early 1980s. RSX-11D first appeared on the PDP-11/40 in 1972...

, etc.), CP/M
CP/M
CP/M was a mass-market operating system created for Intel 8080/85 based microcomputers by Gary Kildall of Digital Research, Inc...

, and most recently by Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

's MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

, has been very controversial with Mac users. The type and creator system is considerably richer and more sophisticated than that provided by extensions, and many users felt that adopting DOS conventions is a backward step. They claim that type and creator information rightfully belongs to the metadata associated with a file, and is therefore illogically placed within the file's name, where its presence can cause problems for the user. Apple defends the decision by saying that extensions have become the de facto standard for indicating file type, and they need to work seamlessly with the rest of the industry.

Type codes are not readily accessible for users to manipulate, although they can be viewed and changed with certain software, most notably the Mac OS X command line tools GetFileInfo and SetFile which are installed as part of the developer tools into /Developer/Tools, or the ResEdit
ResEdit
ResEdit was a developer tool application for the Apple Macintosh, used to create and edit resources directly in the Mac's resource fork architecture. It was an alternative to tools such as REdit, and the resource compiler Rez. For the average user, ResEdit was generally easier to use, because it...

 utility available for older Macs.

Changes done in Mac OS X v10.4
Mac OS X v10.4
Mac OS X v10.4 Tiger is the fifth major release of Mac OS X, Apple's desktop and server operating system for Macintosh computers. Tiger was released to the public on 29 April 2005 for US$129.95 as the successor to Mac OS X Panther , which had been released 18 months earlier...

 with the addition of Uniform Type Identifier
Uniform Type Identifier
A Uniform Type Identifier is a text string used on software provided by Apple Inc. to uniquely identify a given class or type of item...

s suggest that Apple heard those criticisms and is working on a file type successor to both type code and filename extensions.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK