Version 1 (00010000) is the older form. It differs from version 2 in two
ways: the 16-byte filler names the home file system, and entry 7 holds the file information
in that system’s own layout. Version 2 replaces entry 7 with entries 8, 10, 11 and 12. The
layouts here are from Apple II File Type Notes $E0/$0001 (AppleSingle) and $E0/$0002-3
(AppleDouble); numbers are high byte first.
Home file system
The field at offset 8 is 16 bytes of ASCII, padded with spaces and not length-prefixed:
| Text | System |
|---|---|
Macintosh | Macintosh |
ProDOS | Apple II ProDOS |
MS-DOS | MS-DOS |
Unix | Unix |
VAX VMS | VAX VMS |
Entries
Version 1 defines entries 1 to 7 and 9: data fork, resource fork, real name, comment, black-and-white icon, colour icon, file info and Finder info. The AppleDouble note (File Type Note $E0/$0002) adds entry 100, the data pathname, for header files. Entries 8 and 10 to 15 are additions of version 2, which does not define entry 100.
Entry 100: Data pathname
In a version 1 AppleDouble header file, entry 100 holds the pathname of the data file as it was created, as a GS/OS class-one string:
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 2 | Path length | The pathname’s length in bytes, high byte first |
| 2 | varies | Pathname | The data file’s path, in ASCII |
To find the data file for a header file, a reader:
- uses the data pathname if there is one; if that path no longer exists, it takes the file name from the end of the path and looks for it in the current folder;
- otherwise, or if that fails, makes candidate names from the header file’s name by the home file system’s naming rules;
- and if none is found, asks the user where the data file is.
Entry 7: File info
Its layout depends on the home file system.
Macintosh, 16 bytes
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 4 | Created | Seconds from 1 January 1904 |
| 4 | 4 | Modified | Seconds from 1 January 1904 |
| 8 | 4 | Backed up | Seconds from 1 January 1904 |
| 12 | 4 | Attributes | Bit 0 locked, bit 1 protected |
ProDOS, 16 bytes
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 2 | Created date | ProDOS 8 format, below |
| 2 | 2 | Created time | ProDOS 8 format, below |
| 4 | 2 | Modified date | ProDOS 8 format, below |
| 6 | 2 | Modified time | ProDOS 8 format, below |
| 8 | 2 | Access | ProDOS 8 uses the low byte: see entry 11 |
| 10 | 2 | File type | ProDOS 8 uses the low byte: see the file types |
| 12 | 4 | Auxiliary type | ProDOS 8 uses the low word |
A ProDOS 8 date word has the year in bits 9 to 15, the month in bits 5 to 8 and the day in bits 0 to 4. A time word has the hour in bits 8 to 12 and the minute in bits 0 to 5. By ProDOS 8 Technical Note 28, years 40 to 99 are 1940 to 1999, years 0 to 39 are 2000 to 2039, and 100 to 127 are invalid.
MS-DOS, 6 bytes
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 4 | Modified | A date and time in MS-DOS’s packed format; the note does not give the order of the two words |
| 4 | 2 | Attributes | The MS-DOS attributes |
Unix, 12 bytes
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 4 | Created | Unix time: seconds from 1 January 1970 |
| 4 | 4 | Last used | Unix time |
| 8 | 4 | Modified | Unix time |
VAX VMS
The File Type Note lists VAX VMS as a home file system but gives no layout for its file information, and no public document found does. The viewer shows this entry’s bytes.