Class for packing and unpacking AppleSingle and AppleDouble data.
For a list of all members of this type, see AppleFile Members.
System.Object
AppleFile
AppleFile packs or unpacks file data to or from AppleSingle
or AppleDouble format. The AppleSingle format allows a
file's contents to be packed together with related file information,
such as file dates, resources, icons, and so forth, into a single file.
The AppleDouble format is similar, but different in that the
file's contents are stored in one file, and the remaining file
information (dates, resources, icons, and so forth) is stored in a
separate AppleDouble header file.
In the MIME world, AppleSingle and AppleDouble are the preferred ways to transfer Macintosh files, with AppleDouble preferred over AppleSingle where possible. In actual practice, the BinHex format is common (most likely due to the fact that most Macintosh archives store files in BinHex format). The use of AppleSingle and AppleDouble in MIME is described in RFC 1740 and is referred to as MacMIME. MacMIME is an official Internet standards track protocol.
To use AppleFile for packing file data to the AppleDouble
header format, first set the Format property to
AppleFile.AppleDouble to set the format type to AppleDouble
header, then set one or more of the following properties to set the
file data: FileName, CreateTime, ModifyTime, BackupTime, AccessTime, ResourceFork. Next, call the Pack() method to pack all the file information into a
single buffer. Finally, retrieve the PackedData property to get the packed
AppleDouble header data.
To use AppleFile for packing file data to the AppleSingle
format, first set the Format
property to AppleFile.AppleSingle to set the format type to
AppleSingle, then set one or more of the following properties to set
the file data: FileName,
CreateTime, ModifyTime, BackupTime, AccessTime, ResourceFork, DataFork. Next, call the Pack() method to pack all the file information into a
single buffer. Finally, retrieve the PackedData property to get the packed
AppleSingle data.
To use AppleFile to unpack AppleSingle or AppleDouble file
data, first set the PackedData property to set the packed
data into the AppleFile object. Then call the Unpack() method to unpack the file data. Finally,
retrieve the Format, FileName, CreateTime(), and other properties to
get the file data.
Note: The definitive reference for AppleSingle and AppleDouble is AppleSingle/AppleDouble Formats: Developer's Note, available from Apple Computer.
Namespace: Hunny.Mime
Assembly: Hunny.Mime (in Hunny.Mime.dll)
AppleFile Members | Hunny.Mime Namespace