Mac OS: File Type and Creator Codes, and File Formats
File Type Codes
The desktop database keeps track of the file type of every file. Here are examples of some common 4-character file type codes, followed by descriptions:
- CWWP (AppleWorks word processing)
- MooV (QuickTime movie)
- TEXT (plain text file)
- PICT (picture file)
- GIFf (GIF image)
When you open a file from within an application, the application looks at each file's 4-character file type code to see if it can be opened. Some applications can open a variety of file types.
Creator Codes
The desktop database also keeps track of the creators of files. As you might guess, this is a 4-character code that identifies which program actually created the file. Here are examples of some common 4-character creator codes, followed by descriptions:
- BOBO (AppleWorks)
- TVOD (QuickTime)
- ttxt (SimpleText)
- Hway (iMovie)
For example, a text file saved with SimpleText has a file type of TEXT and a creator of ttxt.
You can find out the type and creator of a file using a utility such as ResEdit, or by dragging a file onto the Custom Search Options window in Sherlock, or through the use of an AppleScript application/droplet.
File Formats
A file format is a set of rules and instructions that are used to read and write files. Some file formats are publicly known, while others are proprietary. Examples of publicly known file formats:
- text
- Rich Text Format (RTF)
- binhex
Examples of proprietary file formats:
- AppleWorks word processing document
- FileMaker database
When an application reads in a file it expects certain information, in a certain order. Usually there is a header, where global information about the particular file is kept. Then there might be a database of objects if it is a drawing program, or some text if it is a word processor.
File formats used by various applications are never needed by the ordinary user, but may be needed by developers who are writing translators or other utilities.