Each entry has an ID and is found through its descriptor. Numbers are big-endian. The tables give the layout of each defined entry; “filler” bytes should be zero. Entries 9 and 2 have pages of their own, the Finder info and the resource fork, and entry 7 belongs to version 1.
1: Data fork
The file’s contents, as an arbitrary stream of bytes. It appears only in AppleSingle. An AppleDouble file keeps the data fork in the plain file beside it, so its header file should not have this entry.
2: Resource fork
The Macintosh resource fork as a byte stream, in the Resource Manager’s layout: see Resource fork. Apple recommends placing it last in the file.
3: Real name
The file’s name as it was on its home file system: a string of any length, usually short printable ASCII. There is no length byte and no terminator: the entry’s length is the name’s length. The explorer reads it as Mac OS Roman.
4: Comment
The comment the Finder’s Get Info window shows, a string of any length in printable ASCII. RFC 1740 says 200 characters or fewer, and describes this as a claim rather than a rule.
5: Black-and-white icon
A standard Macintosh icon of 32 rows of 32 one-bit pixels, 128 bytes in all, with 1 for
black. The leftmost pixel of each row is the top bit of its 4-byte word. This is the same
layout as the data of an ICON resource.
| Offset | Size | Field | Value |
|---|---|---|---|
| 0 | 4 × 32 | Rows | 32 rows of 32 bits; 1 is black, 0 is white |
6: Colour icon
The format does not fix a layout for this entry. RFC 1740 says the likely form is a
cicn resource, and that the System 7 icon families are candidates too; nothing
in the file says which was used. A reader can check cicn against its own
fields and otherwise go by the entry’s size.
The cicn resource
| Offset | Size | Field | Value |
|---|---|---|---|
| 0 | 4 | Base address | Filled in in memory |
| 4 | 2 | Row bytes | The length of a row of pixels, with the top two bits marking a pixel map |
| 6 | 8 | Bounds | Top, left, bottom and right |
| 14 | 2 | Version | 0 in a resource |
| 16 | 2 | Pack type | 0 for no packing |
| 18 | 4 | Pack size | 0 when not packed |
| 22 | 4 | Horizontal resolution | 16.16 fixed point, pixels an inch |
| 26 | 4 | Vertical resolution | 16.16 fixed point, pixels an inch |
| 30 | 2 | Pixel type | 0 for indexed |
| 32 | 2 | Pixel size | 1, 2, 4 or 8 bits |
| 34 | 2 | Component count | 1 when indexed |
| 36 | 2 | Component size | Bits a component |
| 38 | 4 | Plane bytes | Offset to the next plane, 0 |
| 42 | 4 | Colour table handle | Filled in in memory |
| 46 | 4 | Reserved | |
| 50 | 14 | Mask bitmap | Base address, row bytes, bounds |
| 64 | 14 | Black-and-white bitmap | Base address, row bytes, bounds |
| 78 | 4 | Icon data handle | Filled in in memory |
| 82 | rows × row bytes | Mask data | One bit a pixel: 1 draws the pixel |
| … | rows × row bytes | Bitmap data | The one-bit icon |
| … | 8 + 8 × colours | Colour table | Seed (4), flags (2, bit 15 for device order), entries less one (2), then per colour an index and red, green and blue of 16 bits each |
| … | rows × row bytes | Pixel data | Indexes into the colour table |
The icon families
| Size | Type | Layout |
|---|---|---|
| 64 | ics# | 16 × 16, one bit, then a 16 × 16 mask |
| 128 | ics4 | 16 × 16, four bits a pixel |
| 256 | ICN# | 32 × 32, one bit, then a 32 × 32 mask |
| 256 | ics8 | 16 × 16, eight bits a pixel |
| 512 | icl4 | 32 × 32, four bits a pixel |
| 1,024 | icl8 | 32 × 32, eight bits a pixel |
The 4-bit and 8-bit forms use the Macintosh’s standard colour tables. A 256-byte entry
could be either ICN# or ics8: the file does not say which.
8: File dates
Four signed 32-bit numbers, in seconds relative to midnight at the start of
1 January 2000, GMT, with earlier times negative. A date that is not known is
80000000, the earliest time the field can hold.
| Offset | Size | Field |
|---|---|---|
| 0 | 4 | Created |
| 4 | 4 | Modified |
| 8 | 4 | Backed up |
| 12 | 4 | Accessed |
10: Macintosh file info
| Offset | Size | Field |
|---|---|---|
| 0 | 3 | Filler |
| 3 | 1 | Attributes |
| Mask | Attribute |
|---|---|
01 | Locked |
02 | Protected |
11: ProDOS file info
| Offset | Size | Field |
|---|---|---|
| 0 | 2 | Access |
| 2 | 2 | File type |
| 4 | 4 | Auxiliary type |
ProDOS 16 and GS/OS use the whole of these fields. ProDOS 8 uses only the low byte of
the access and file type words and the low word of the auxiliary type, and the rest should
be zero. The file type codes have
a page of their own. The auxiliary type depends on the type: for a TXT file
it is the record length (0 for a sequential file), and for BIN and
BAS files it is the load address.
| Mask | Access bit |
|---|---|
80 | Destroy enabled |
40 | Rename enabled |
20 | Backup needed: set by ProDOS when the file changes, cleared by backup programs |
04 | Invisible (GS/OS) |
02 | Write enabled |
01 | Read enabled |
12: MS-DOS file info
| Offset | Size | Field |
|---|---|---|
| 0 | 1 | Filler |
| 1 | 1 | Attributes |
| Mask | Attribute |
|---|---|
01 | Read-only |
02 | Hidden |
04 | System |
08 | Volume label (root directory only) |
10 | Subdirectory |
20 | Archive: new or changed, needs backing up |
Bits 40 and 80 are not defined.
13: Short name
The short name the file has on an AFP server: a string of any length, usually printable
ASCII and often starting with !.
14: AFP file info
| Offset | Size | Field |
|---|---|---|
| 0 | 3 | Filler |
| 3 | 1 | Attributes |
| Mask | Attribute |
|---|---|
01 | Invisible |
02 | Multi-user: allows simultaneous access |
04 | System |
40 | Backup needed |
Bits 08, 10, 20 and 80 are not
defined.
15: AFP directory ID
A 32-bit number: the directory ID of the file’s folder on the AFP server.