AppleSingle
   HOME

TheInfoList



OR:

AppleSingle Format and AppleDouble Format are
file format A file format is a 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 or free. Some file formats ...
s developed by
Apple Computer Apple Inc. is an American multinational technology company headquartered in Cupertino, California, United States. Apple is the largest technology company by revenue (totaling in 2021) and, as of June 2022, is the world's biggest company b ...
to store Mac OS "dual-forked" files on the
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser 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, and ot ...
filesystem being used in
A/UX A/UX is Apple Computer's Unix-based operating system for Macintosh computers, integrated with System 7's graphical interface and application compatibility. Launched in 1988 and discontinued in 1995 with version 3.1.1, it is Apple's first official ...
, the Macintosh platform's first
Unix-like A Unix-like (sometimes referred to as UN*X 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 Unix-li ...
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
. 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 Mae is an American rock band that formed in Norfolk, Virginia in 2001. The band's name is an acronym for "Multi-sensory Aesthetic Experience", based on a course taken by drummer Jacob Marshall while a student at Old Dominion University. Histor ...
, 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 two ''forks'' of a classic Mac OS file into a single file, along with Hierarchical File System, HFS's extended metadata. The resulting file is suitable for transmission over File Transfer Protocol, FTP, ...
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 A media type (also known as a MIME type) is a two-part identifier for file formats and format contents transmitted on the Internet. The Internet Assigned Numbers Authority, Internet Assigned Numbers Authority (IANA) is the official authority for t ...
. 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, as opposed to being converted to AppleSingle.


Usage

Before
Mac OS X macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac (computer), Mac computers. Within the market of ...
, 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 In information theory, data compression, source coding, or bit-rate reduction is the process of encoding information using fewer bits than the original representation. Any particular compression is either lossy or lossless. Lossless 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 WebDAV (Web Distributed Authoring and Versioning) is a set of extensions to the Hypertext Transfer Protocol (HTTP), which allows user agents to collaboratively author contents ''directly'' in an HTTP web server by providing facilities for concu ...
that don't 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 In computing, a hidden folder (sometimes hidden directory) or hidden file is a folder or file which filesystem utilities do not display by default when showing a directory listing. They are commonly used for storing user preferences or preservi ...
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 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 Netatalk (pronounced "ned-uh-talk") is a free, open-source implementation of the Apple Filing Protocol (AFP). It allows Unix-like operating systems to serve as file server for Macintosh computers running macOS or Classic Mac OS. Netatalk was ...
. 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. Apple Inc. is an American multinational technology company headquartered in Cupertino, California, United States. Apple is the largest technology company by revenue (totaling in 2021) and, as of June 2022, is the world's biggest company b ...
knowledgebase note about the AppleDouble format Apple Inc. software Archive formats