lenoil@Apple.COM (Robert Lenoil) (11/28/89)
The AppleSingle and AppleDouble file formats are documented in the A/UX documentation set. In A/UX release 1.0, the specification was in section 5 of the release notes (which are tacked onto the back of the "A/UX Local System Administration" manual), pages 5-2 through 5-7. I don't have the documentation for A/UX 1.1 to verify this, but I suspect that the specification was incorporated into "A/UX Toolbox: Macintosh ROM Interface" for release 1.1. (If anyone out there has the 1.1 documentation and can confirm/deny this, please post a followup.) Robert Lenoil Apple Computer, Inc.
ksand@appleoz.oz.au (Kent Sandvik) (12/07/89)
lenoil@Apple.COM (Robert Lenoil) writes in article <36800@apple.Apple.COM>: The AppleSingle and AppleDouble file formats are documented in the A/UX documentation set. In A/UX release 1.0, the specification was in section 5 of the release notes (which are tacked onto the back of the "A/UX Local System Administration" manual), pages 5-2 through 5-7. I don't have the documentation for A/UX 1.1 to verify this, but I suspect that the specification was incorporated into "A/UX Toolbox: Macintosh ROM Interface" for release 1.1. (If anyone out there has the 1.1 documentation and can confirm/deny this, please post a followup.) The AppleSingle/AppleDouble format is defined in Appendix B of the A/UX 1.1 Toolbox:Macintosh ROM Interface Manual. Here is a short description of the formats: AppleSingle format (data and resource fork in the same file) Header: Magic number 4 bytes AppleSingle 0x00051600 Version number 4 bytes Current version 0x0010000 Home File system 16 bytes, ASCII encoded Defines the home file system: 'Macintosh' or 0x4d616369 0x6e746f73 0x68202020... 'ProDOS' or .... 'MS-DOS' or .... 'UNIX' or ... 'VAX VMS' or .... Number of entries 2 bytes How many entries are included in the file. Entry descriptor for each entry: Entry ID 4 bytes Defines what the entry is: Data fork 1 Resource fork 2 Real name 3 Comment 4 Icon, B&W 5 Icon, color 6 File Info 7 Finder Info 8 Offset 4 bytes The offset of the beginning of the entry data from the beginning of the file. Length 4 bytes The length of the data in bytes. AppleDouble format (data and resource forks in two separate files) The AppleDouble data file contains the data fork exactly in the form it appears in a Macintosh file, with no extra header. The AppleDouble header information is stored in the resource file, or header file as it is called in this instance. The header file has the same format as an AppleSingle file. The magic number for an AppleDouble header file is 0x00051607. The entries in this header file can appear in any order, but it is usually more efficient to put the resource fork at the end of the file, because the resource fork is the entry most likely to expand. Hope this helps someone, Kent -- Kent Sandvik -- ksand@appleoz.oz.AU | Apple Australia DTS Ph: +61 2 452 82 93 {uunet,mcvax}!munnari!appleoz.oz!ksand | AppleLink: AUSTAUX, Discl: All comments mine -- CyberSpace, the Final Frontier --