AppleSingle and AppleDouble formats
   HOME

TheInfoList



OR:

AppleSingle Format and AppleDouble Format are
file format A file format is a Computer standard, standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. File formats may be either proprietary format, pr ...
s developed by
Apple Computer Apple Inc. is an American multinational corporation and technology company headquartered in Cupertino, California, in Silicon Valley. It is best known for its consumer electronics, software, and services. Founded in 1976 as Apple Computer Co ...
to store
Mac OS Mac operating systems were developed by Apple Inc. in a succession of two major series. In 1984, Apple debuted the operating system that is now known as the classic Mac OS with its release of the original Macintosh System Software. The system ...
"dual-forked" files on the
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
filesystem being used in
A/UX A/UX is a Unix-based operating system from Apple Computer for Macintosh computers, integrated with System 7's graphical interface and application compatibility. It is Apple's first official Unix-based operating system, launched in 1988 and disc ...
, the Macintosh platform's first
Unix-like A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
. AppleSingle combined both file forks and the related Finder meta-file information into a single file, whereas AppleDouble stored them as two separate files. Support for the formats was later added to Unix software such as NFS and MAE, but they saw little use outside this small market. AppleSingle is similar in concept to the more popular
MacBinary MacBinary is a file format that combines the data fork and the resource fork of a classic Mac OS file into a single file, along with Hierarchical File System (Apple), HFS's extended metadata. The resulting file is suitable for transmission over Fil ...
format, in that the resource and data forks are combined with a header containing the Finder information. In fact, the format is so similar, it seemed there was no reason why Apple did not simply use MacBinary instead, which by that point was widely known and used. Some not-so-obvious reasons are explained in an Internet Draft. The format was later assigned the
MIME type In information and communications technology, a media type, content type or MIME type is a two-part identifier for file formats and content formats. Their purpose is comparable to filename extensions and uniform type identifiers, in that they ide ...
. AppleDouble leaves the data fork in its original format, allowing it to be edited by normal Unix utilities. The resource fork and Finder information, both proprietary and lacking editors under Unix, were combined into a second file. A MIME type was also assigned to AppleDouble, . For sending to an AppleDouble un-aware system, the file was generally encoded using
Base64 In computer programming, Base64 is a group of binary-to-text encoding schemes that transforms binary data into a sequence of printable characters, limited to a set of 64 unique characters. More specifically, the source binary data is taken 6 bits ...
, as opposed to being converted to AppleSingle.


Usage

Before Mac OS X, AppleSingle and Double had little presence in the Mac market, due largely to the small market share of A/UX. Nevertheless, they did force various file compression vendors to add support for the formats, and confuse future MacBinary versions. Mac OS X revived the use of AppleDouble; on file systems such as NFS and WebDAV that do not natively support resource forks, Finder information, or extended attributes, that information is stored in AppleDouble format, with the second file having a name generated by prepending "._" to the name of the first file (thus, this information acts as a hidden file when viewed from a non-Apple Unix-based operating system). The files are sometimes moved to a separate directory called . Metadata separation is also done in the OS X 10.3+ Finder Zip file, Zip compression and the command line utility, with a copy of the AppleDouble metadata stored in a directory.


Manipulation

Unwanted "._" files can be removed using dot_clean -m on Mac OS X. Doing so also merges AppleDouble metadata with the corresponding files. AppleDouble files can be manually created through creative abuse of (which is AppleDouble-aware) and (which is not). On other systems, the command and a Perl script called can be used to view AppleDouble data. Both are part of Netatalk. The macOS system provides a set of library functions that allows for packing and unpacking AppleSingle and AppleDouble files in C.{{man, 3, copyfile, Darwin


References


External links


AppleSingle and AppleDouble format internals
– from the original A/UX documentation
RFC 1740 - MIME Encapsulation of Macintosh files
– documents AppleSingle/Double in appendixes
Mac Binary Converter
an open source tool for converting between different Macintosh file encodings.
Mac::AppleSingleDouble
a Perl module for reading AppleSingle and AppleDouble files
Mac OS X: Apple Double Format Creates File Name With the Prefix '._'
Apple Inc. knowledgebase note about the AppleDouble format Apple Inc. software Archive formats