resource fork
   HOME

TheInfoList



OR:

The resource fork is a fork or section of a
file File or filing may refer to: Mechanical tools and processes * File (tool), a tool used to ''remove'' fine amounts of material from a workpiece **Filing (metalworking), a material removal process in manufacturing ** Nail file, a tool used to gent ...
on
Apple An apple is an edible fruit produced by an apple tree (''Malus domestica''). Apple fruit tree, trees are agriculture, cultivated worldwide and are the most widely grown species in the genus ''Malus''. The tree originated in Central Asia, wh ...
's
classic Mac OS Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Macintosh family of personal computers by Apple Computer from 1984 to 2001, starting with System 1 and ending with Mac OS 9. The ...
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 ...
, which was also carried over to the modern
macOS 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 computers. Within the market of desktop and lapt ...
for compatibility, used to store structured data along with the unstructured data stored within the data fork. A resource fork stores information in a specific form, containing details such as icon bitmaps, the shapes of windows, definitions of menus and their contents, and application code (
machine code In computer programming, machine code is any low-level programming language, consisting of machine language instructions, which are used to control a computer's central processing unit (CPU). Each instruction causes the CPU to perform a very ...
). For example, a word processing file might store its text in the data fork, while storing any embedded images in the same file's resource fork. The resource fork is used mostly by
executable In computing, executable code, an executable file, or an executable program, sometimes simply referred to as an executable or binary, causes a computer "to perform indicated tasks according to encoded instruction (computer science), instructi ...
s, but every file is able to have a resource fork.


The Macintosh file system

Originally conceived and implemented by programmer
Bruce Horn Bruce Lawrence Horn (born 1960) is a programmer and creator. He created the Macintosh Finder and the Macintosh Resource Manager for Apple Computer. His signature is amongst those molded to the case of the Macintosh 128K. He is a distinguished e ...
, the resource fork was used for three purposes with
Macintosh file system Macintosh File System (MFS) is a volume (computing), volume format (or disk file system) created by Apple Computer for storing Computer file, files on 400K floppy disks. MFS was introduced with the original Macintosh 128K, Apple Macintosh comput ...
: * It was used to store all graphical data on disk until it was needed, then retrieved, drawn on the screen, and thrown away. This software variant of
virtual memory In computing, virtual memory, or virtual storage is a memory management technique that provides an "idealized abstraction of the storage resources that are actually available on a given machine" which "creates the illusion to users of a very l ...
helped Apple to reduce memory requirements from 1 MB in the
Apple Lisa Lisa is a desktop computer developed by Apple, released on January 19, 1983. It is one of the first personal computers to present a graphical user interface (GUI) in a machine aimed at individual business users. Its development began in 1978. ...
to 128 KB in Macintosh. * Because all the pictures and text were stored separately in a resource fork, it could be used to allow a non-programmer to translate an application for a foreign market, a process called
internationalization and localization In computing, internationalization and localization (American) or internationalisation and localisation (British English), often abbreviated i18n and L10n, are means of adapting computer software to different languages, regional peculiarities and ...
. * It could be used to distribute nearly all of the components of an application in a single file, reducing clutter and simplifying application installation and removal. The resource fork is implemented in all of the
file system In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
s used for system drives on the
Macintosh The Mac (known as Macintosh until 1999) is a family of personal computers designed and marketed by Apple Inc., Apple Inc. Macs are known for their ease of use and minimalist designs, and are popular among students, creative professionals, and ...
(
MFS MFS may refer to: Education *Miletich Fighting Systems, a mixed martial arts training camp founded by Pat Miletich *Moorestown Friends School, a private Quaker school located in Moorestown, New Jersey *Moscow Finnish School, a Finnish private sc ...
,
HFS HFS may refer to: Computing * Hardware functionality scan, a security mechanism used in Microsoft Windows operating systems * Hierarchical File System, a file system used by Apple Macintosh computers * Hierarchical File System (IBM MVS), used MV ...
and
HFS Plus HFS Plus or HFS+ (also known as Mac OS Extended or HFS Extended) is a journaling file system developed by Apple Inc. It replaced the Hierarchical File System (HFS) as the primary file system of Apple computers with the 1998 release of Mac OS 8.1 ...
). The presence of a resource fork makes it easy to store a variety of additional information, such as allowing the system to display the correct
icon An icon () is a religious work of art, most commonly a painting, in the cultures of the Eastern Orthodox, Oriental Orthodox, and Catholic churches. They are not simply artworks; "an icon is a sacred image used in religious devotion". The most ...
for a file and open it without the need for a
file extension A filename extension, file name extension or file extension is a suffix to the name of a computer file (e.g., .txt, .docx, .md). The extension indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
in the file name. While access to the data fork works like file access on any other operating system pick a file, pick a byte offset, read some data access to the resource fork works more like extracting structured records from a
database In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases sp ...
. (
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
also has a concept of "
resources Resource refers to all the materials available in our environment which are technologically accessible, economically feasible and culturally sustainable and help us to satisfy our needs and wants. Resources can broadly be classified upon their a ...
", but these are completely unrelated to resources in Mac OS.) The resource fork is sometimes used to store the
metadata Metadata is "data that provides information about other data", but not the content of the data, such as the text of a message or the image itself. There are many distinct types of metadata, including: * Descriptive metadata – the descriptive ...
of a file, although it can also be used for storing the actual data, as was the case with font files in the classic Mac operating systems. Note that the Macintosh file systems also have a separate area for metadata distinct from either the data or resource fork. Being part of the catalogue entry for the file, it is much faster to access this. However, the amount of data stored here is minimal, being just the creation and modification timestamps, the file type and creator codes, fork lengths, and the file name. Some files have only a resource fork. Classic 68k applications are one example, where even the executable code is contained in resources of type 'CODE'. Later
PowerPC PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
binaries store the executable code in the data fork. As resource forks are supported only on the file systems HFS, HFS Plus, and APFS, they cannot be used on
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 ...
s which use other file systems. At present, HFS is supported only by the Macintosh operating system, which means that only machines running Mac OS can use resource forks. Even in a Mac OS system, resource forks cannot be used if the
Unix File System The Unix file system (UFS) is a family of file systems supported by many Unix and Unix-like operating systems. It is a distant descendant of the original filesystem used by Version 7 Unix. Design A UFS volume is composed of the following p ...
has been installed. In the HFS Plus file system, settings can be made to allow other forks in addition to the data and resource forks, to create a "multi-fork" application. However, as forks can make it difficult to exchange files with other operating systems, this feature is not in common use. Even in macOS, resource forks are seldom used anymore. Currently, macOS supports resource forks on Windows SMB shares by creating a hidden file with the characters "._" added at the beginning of the file name, in the same directory as the data fork file.


Resource identifiers

Each resource has an
OSType A FourCC ("four-character code") is a sequence of four bytes (typically ASCII) used to uniquely identify data formats. It originated from the OSType or ResType metadata system used in classic Mac OS and was adopted for the Amiga/Electronic Arts I ...
identifier (a four byte value) and an ID (a signed 16-bit
word A word is a basic element of language that carries an semantics, objective or pragmatics, practical semantics, meaning, can be used on its own, and is uninterruptible. Despite the fact that language speakers often have an intuitive grasp of w ...
), as well as an optional name. There are standardized resource types for
dialog box The dialog box (also called dialogue box (non-U.S. English), message box or simply dialog) is a graphical control element in the form of a small window that communicates information to the user and prompts them for a response. Dialog boxes are ...
es ('DITL), images ('
PICT The Picts were a group of peoples who lived in what is now northern and eastern Scotland (north of the Firth of Forth) during Late Antiquity and the Early Middle Ages. Where they lived and what their culture was like can be inferred from ear ...
'), sounds ('snd ') and even for
executable In computing, executable code, an executable file, or an executable program, sometimes simply referred to as an executable or binary, causes a computer "to perform indicated tasks according to encoded instruction (computer science), instructi ...
binaries ('CODE') which, until the advent of the
PowerPC PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
processor Processor may refer to: Computing Hardware * Processor (computing) **Central processing unit (CPU), the hardware within a computer that executes a program *** Microprocessor, a central processing unit contained on a single integrated circuit (I ...
, were without exception stored in the resource fork. Subroutines for rendering
window A window is an opening in a wall, door, roof, or vehicle that allows the exchange of light and may also allow the passage of sound and sometimes air. Modern windows are usually glazed or covered in some other transparent or translucent materia ...
s are stored in their own type of resources ('WDEF'), subroutines for rendering menus in theirs ('MDEF'), and if there is a type of data you think does not fit any of the standardized categories, you can just as well use a type of your own (e.g. 'John') actually any four characters or 32-bit value can serve as a resource type. This arrangement enabled users to easily customize not only individual applications but also the operating system itself, using tools such as
ResEdit ResEdit is a discontinued developer tool application for the Apple Macintosh, used to create and edit resources directly in the Mac's resource fork architecture. It was an alternative to tools such as REdit, and the resource compiler ''Rez.'' Fo ...
to modify the resources of an application file or any of the system files. Within an application or other code, resources can be loaded simply using a combination of their type, ID or name, without regard to how and where they are stored in the resource fork. The client is returned a
Handle A handle is a part of, or attachment to, an object that allows it to be grasped and manipulated by hand. The design of each type of handle involves substantial ergonomic issues, even where these are dealt with intuitively or by following tra ...
to the loaded resource which can then be accessed like any other heap-based data. The OS component that facilitates this is the ''Resource Manager''. In addition to abstracting the details of the data storage from the data itself, the Resource Manager also arranges sets of open resource forks into a stack, with the most recently opened file on top. When trying to load a resource, it will look in the top of the stack first, (perhaps the current document's resource fork), then the next one down (the application's resource fork), then the next one (system resource forks). This arrangement is very powerful it permits local resources to override more global ones lower down so an application can provide its own icons or fonts in place of the standard system ones, for example. It also allows an application to load resources from the system using the same API as any other resource, without regard to where or how that resource is stored to the application, all resources are equally available and easy to use. The system reserves resource IDs in a certain range to help avoid resource conflicts arising from this. Resource Manager APIs allow the programmer to manipulate the stack and modify the search behaviour.


Editing resource forks

As the resource fork can be edited with a resource editor such as
ResEdit ResEdit is a discontinued developer tool application for the Apple Macintosh, used to create and edit resources directly in the Mac's resource fork architecture. It was an alternative to tools such as REdit, and the resource compiler ''Rez.'' Fo ...
, it can be used to localize and customize
software Software is a set of computer programs and associated documentation and data. This is in contrast to hardware, from which the system is built and which actually performs the work. At the lowest programming level, executable code consists ...
. In addition, most resource editors allow visual editing of data. In
macOS 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 computers. Within the market of desktop and lapt ...
, it is possible to use resources when developing an application. However, if the application may need to be used in UFS, it is also possible to configure it so that the entire resource fork is moved to the data fork, using the Raw Resource File setting. The
integrated development environment An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools a ...
s distributed for free by
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 ...
, which include MPW and Apple Developer's Tools, include a
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
called Rez. This uses a dedicated language, also called Rez, which can be used to create a resource fork by compiling
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
. A decompiler, DeRez, which can be used to change a resource fork back into Rez code is also included. In the structure of the resource fork, there is a piece of data called a "resource map" which stores the positions of resource data items. This can be used to allow
random access Random access (more precisely and more generally called direct access) is the ability to access an arbitrary element of a sequence in equal time or any datum from a population of addressable elements roughly as easily and efficiently as any othe ...
to resource data based on the defined IDs and names. The resource fork can be thought of as consisting of essentially two objects, the resource map and the resource data itself, but in fact each data type is a hierarchical structure which stores multiple items of data. The format in which the information in the resource data is stored is defined based on the types of information, which are known as "resource types." Resource data often makes references to other types of data. In macOS, forks are named ''file''/..namedfork/''forkname'', ''e.g.'', the resource fork of the file IMG_0593.jpg is IMG_0593.jpg/..namedfork/rsrc. The ls command supports a -l@ option which lists a file's forks.


How a resource fork is accessed

Resource forks appear as the
extended attribute Extended file attributes are file system features that enable users to associate computer files with metadata not interpreted by the filesystem, whereas regular attributes have a purpose strictly defined by the filesystem (such as permissions or ...
com.apple.ResourceFork. Previously resource forks were accessed via the 'Resource Manager'
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
. This API is now deprecated. Under the deprecated API: # When a resource fork is accessed, data including the start position and length of the resource data and resource map is read in from the header. # If a resource type to read in has been specified, a check is performed to make sure that type is present in the resource list, and the number of items of data containing that type and their offsets in the resource reference list from the start position of the resource map is found. # The resource ID, the offset of the resource name, the resource properties, and the offset of the data from the start position of the resource data is found. # If resource data with the specified ID or name is present in the resource data, the offset obtained above is accessed, the data length is found, and all the data stored there is read in, and returned as the return value. File Manager APIs such as PBOpenRF() also allowed access to the raw resource fork; however, they should be used only for applications such as copying a file Apple strongly warns against using the resource fork as a "second data fork." From the
POSIX The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming interf ...
interface, the resource fork could be accessed as ''filename''/..namedfork/rsrc or as ''filename''/rsrc; the shorter form was deprecated in
Mac OS X v10.4 Mac OS X Tiger (version 10.4) is the 5th major release of macOS, Apple's desktop and server operating system for Mac computers. Tiger was released to the public on April 29, 2005 for US$129.95 as the successor to Mac OS X 10.3 Panther. Som ...
and removed completely in
Mac OS X v10.7 OS X Lion, also known as Mac OS X Lion, (version 10.7) is the eighth major release of macOS, Apple's desktop and server operating system for Mac computers. A preview of OS X 10.7 Lion was publicly shown at the "Back to the Mac" Apple Speci ...
.


Data types in a resource fork

The smallest elements making up a resource fork are called data types. There are several data types. After a resource fork is accessed, its contents can be found by reading it in as appropriate for the data types defined in advance. Placing definitions inside the program stating how data is to be treated makes it possible to store resources called TMPL resources as well. Using this method increases the visibility of the data when viewed with a program such as ResEdit, making later editing simpler. As the Macintosh platform originated with Motorola-based processors (68k and PPC), the data is serialized to disk in
big-endian In computing, endianness, also known as byte sex, is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most sig ...
format. The following is a list of the major data types, in alphabetical order.


Major resource types

The type codes below, like the above datatypes, are used as type identifiers for more than resource forks themselves: they are used to identify file themselves, to describe data in the clipboard, and much more. Note that types must be 4 bytes long, so types like snd and STR actually have a space (0x20) at the end.


Major resource editors

;
ResEdit ResEdit is a discontinued developer tool application for the Apple Macintosh, used to create and edit resources directly in the Mac's resource fork architecture. It was an alternative to tools such as REdit, and the resource compiler ''Rez.'' Fo ...
: Distributed free of charge by Apple. Can be used for visual editing of resource data. If the structure of data is known, it can display a range of different types of data in a visual format. Does not run on modern macOS. ; Resorcerer: Expensive, but popular, as it can be used for visual editing of many more types of data than ResEdit. ; HexEdit: A binary editor, which in fact is normally used more for editing the data fork rather than the resource fork. ;
ResKnife ResKnife is an open-source resource editor for the Apple Macintosh platform. It supports reading and writing resource maps to any fork (data, resource or otherwise) and has basic template-based and hexadecimal editing functionality. ResKnife can ...
: Open-source editor for
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 ...
; no longer maintained. ; Rezycle: A macOS tool that extracts resources from a resource fork into separate binary files while converting many types into formats suitable for modern development. ; resource_dasm: An open-source resource extractor for macOS, also capable of converting many resources into modern formats.


Compatibility problems

The complexity of programming with resource forks has led to compatibility problems when accessing other file systems via file sharing protocols such as AFP, SMB, NFS and
FTP The File Transfer Protocol (FTP) is a standard communication protocol used for the transfer of computer files from a server to a client on a computer network. FTP is built on a client–server model architecture using separate control and data ...
, when storing to non-HFS volumes, or when transmitting files to other systems in other ways (such as via email). The AFP protocol natively supports Resource Forks, and so resource forks are typically transmitted to these volumes as-is, and stored by the server transparently to clients. The SMB protocol supports a file metadata system similar to Macintosh forks known as
Alternate Data Streams New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) as the preferred file ...
(ADSes hereafter). macOS did not support storing resource forks in ADSes on SMB volumes by default until
Mac OS X v10.6 Mac OS X Snow Leopard (version 10.6) is the seventh major release of macOS, Apple's desktop and server operating system for Macintosh computers. Snow Leopard was publicly unveiled on June 8, 2009 at Apple’s Worldwide Developers Conference. ...
. In previous versions of the OS, including upgraded versions of 10.6, this feature can be enabled with a param change or by creating a special file. Networked file sharing protocols such as NFSv3 and FTP do not have a concept of file metadata, and so there is no way to natively store resource forks. This is also true when writing to certain types of local file systems, including UFS, and on SMB volumes where Alternate Data Stream support is not enabled. In those cases, macOS stores metadata and resource forks using a technique called
AppleDouble AppleSingle Format and AppleDouble Format are file formats developed by Apple Computer to store Mac OS "dual-forked" files on the Unix filesystem being used in A/UX, the Macintosh platform's first Unix-like operating system. AppleSingle combined b ...
, in which the data fork is written as one file, and the resource fork and metadata are written as an entirely separate file preceded by a "._" naming convention. For example: ExampleFile.psd would contain the data fork, and ._ExampleFile.psd would contain the resource fork and metadata. Compatibility problems can arise because macOS will handle storage of resource forks differently, depending on macOS version, settings, and file system type. For example, on an SMB network with a mixture of 10.5 and 10.6 clients. A freshly installed 10.6 client will look for and store resource forks on an SMB volume in ADSes, but the 10.5 client will (by default) ignore ADSes and use
AppleDouble AppleSingle Format and AppleDouble Format are file formats developed by Apple Computer to store Mac OS "dual-forked" files on the Unix filesystem being used in A/UX, the Macintosh platform's first Unix-like operating system. AppleSingle combined b ...
format to handle forks. If a fileserver supports both AFP and NFS, then clients using NFS will store files in
AppleDouble AppleSingle Format and AppleDouble Format are file formats developed by Apple Computer to store Mac OS "dual-forked" files on the Unix filesystem being used in A/UX, the Macintosh platform's first Unix-like operating system. AppleSingle combined b ...
format, whereas AFP users will stored the resource fork natively. In those cases, compatibility can sometimes be maintained by forcing clients to use, or not use,
AppleDouble AppleSingle Format and AppleDouble Format are file formats developed by Apple Computer to store Mac OS "dual-forked" files on the Unix filesystem being used in A/UX, the Macintosh platform's first Unix-like operating system. AppleSingle combined b ...
format. Many fileservers providing AFP support do not natively support resource forks on their local file systems. In those cases the forks may be stored in special ways, such as specially named files, special directories, or even Alternate Data Streams. Another challenge is preserving resource forks when transmitting files using non-resource fork-aware applications or with certain transfer methods, including email and FTP. A number of file formats, such as
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, ...
and
BinHex BinHex, originally short for "binary-to-hexadecimal", is a binary-to-text encoding system that was used on the classic Mac OS for sending binary files through e-mail. Originally a hexadecimal encoding, subsequent versions of BinHex are more similar ...
, have been created to handle this. Command-line system tools SplitForks and FixupResourceForks allow manual flattening and merging of resource forks. In addition, a file server seeking to present file systems to Macintosh clients must accommodate the resource fork as well as the data fork of files;
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 ...
servers providing AFP support usually implement this with hidden directories. Older applications written with the Carbon API have a potential issue when being ported to the current
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 seri ...
Macs. While the Resource Manager and operating system know how to deserialize data correctly for common resources like 'snd ' or 'moov', resources created using TMPL resources have to be byte swapped manually to ensure file interoperability between PPC and Intel-based versions of an application. (While the resource map and other implementation details are
big-endian In computing, endianness, also known as byte sex, is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most sig ...
, the Resource Manager by itself doesn't have any knowledge of the contents of a generic resource, and so cannot perform the byte swapping automatically.) Until the advent of
Mac OS X v10.4 Mac OS X Tiger (version 10.4) is the 5th major release of macOS, Apple's desktop and server operating system for Mac computers. Tiger was released to the public on April 29, 2005 for US$129.95 as the successor to Mac OS X 10.3 Panther. Som ...
, the standard UNIX command-line utilities in macOS (such as cp and mv) did not respect resource forks. To copy files with resource forks, one had to use ditto or CpMac and MvMac.


Other operating systems

The concept of a ''resource manager'' for graphics objects, to save memory, originated in the OOZE package on the
Xerox Alto The Xerox Alto is a computer designed from its inception to support an operating system based on a graphical user interface (GUI), later using the desktop metaphor. The first machines were introduced on 1 March 1973, a decade before mass-market G ...
in Smalltalk-76. The concept is now largely universal in all modern operating systems. However, the concept of the resource fork remains peculiar to the Macintosh. Most operating systems used a binary file containing resources, which is then "tacked onto" the end of an existing program file. This solution is used on
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
for instance, and similar solutions are used with the
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wit ...
, although the resources are often left as a separate file. The
Windows NT Windows NT is a proprietary graphical 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 sc ...
NTFS New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) as the preferred fil ...
can support forks (and so can be a file server for Mac files), the native feature providing that support is called an
alternate data stream New Technology File System (NTFS) is a proprietary software, proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) ...
. Windows operating system features (such as the standard Summary tab in the Properties page for non-Office files) and Windows applications are use them and Microsoft was developing a next-generation file system that has this sort of feature as basis. Early versions of the
BeOS BeOS is an operating system for personal computers first developed by Be Inc. in 1990. It was first written to run on BeBox hardware. BeOS was positioned as a multimedia platform that could be used by a substantial population of desktop users a ...
implemented a database within the file system, which could be used in a manner analogous to a resource fork. Performance issues led to a change in later releases to a system of complex file system attributes. Under this system resources were handled in a fashion somewhat more analogous to the Mac.
AmigaOS AmigaOS is a family of proprietary native operating systems of the Amiga and AmigaOne personal computers. It was developed first by Commodore International and introduced with the launch of the first Amiga, the Amiga 1000, in 1985. Early version ...
does not use forked files. Its
executable file In computing, executable code, an executable file, or an executable program, sometimes simply referred to as an executable or binary, causes a computer "to perform indicated tasks according to encoded instructions", as opposed to a data file ...
s are internally divided into a modular structure of large pieces ( hunk) capable of storing code, data, and additional information. Similarly, data and project files have a
chunk Chunk or chunky may refer to: __NOTOC__ Fictional characters * Chunk (comics), a DC Comics character * Chunk (''Toy Story 3''), in the 2010 film ''Toy Story 3'' * Chunk, in the 1985 film ''The Goonies'' * Chunk Palmer, in ''Bull'', a 2016 American ...
structure codified in the
IFF In logic and related fields such as mathematics and philosophy, "if and only if" (shortened as "iff") is a biconditional logical connective between statements, where either both statements are true or both are false. The connective is bicon ...
standard. Other file types are stored similarly to other operating systems. Though not strictly a resource fork,
AmigaOS AmigaOS is a family of proprietary native operating systems of the Amiga and AmigaOne personal computers. It was developed first by Commodore International and introduced with the launch of the first Amiga, the Amiga 1000, in 1985. Early version ...
stores meta data in files known as .info files. .info files can be identified by the .info extension; for example, if you save a project to a disk, two files will be saved, MyProject and MyProject.info. MyProject would be the actual project data and MyProject.info would contain the project icon, information regarding which program is needed to open the project (since there is no application binding in AmigaOS), special project options and any user comments. .info files are invisible on the Amiga's desktop (
Workbench A workbench is a sturdy table at which manual work is done. They range from simple flat surfaces to very complex designs that may be considered tools in themselves. Workbenches vary in size from tiny jewellers benches to the huge benches used by ...
). The icon on the desktop, taken from the .info itself, is the
interface metaphor In user interface design, an interface metaphor is a set of user interface visuals, actions and procedures that exploit specific knowledge that users already have of other domains. The purpose of the interface metaphor is to give the user instanta ...
through which the user interacts both with the project itself and its associated .info file. A dialog box accessible by right-clicking the icon allows the user to see and modify the metadata present in the .info file. .info files can be seen as individual files in the
command-line interface A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
or a
File manager A file manager or file browser is a computer program that provides a user interface to manage files and folders. The most common operations performed on files or groups of files include creating, opening (e.g. viewing, playing, editing or pr ...
. Modern AmigaOS clones (
AROS Aros may refer to: *Aros (Middle-earth), a river in J. R. R. Tolkien's Middle-earth legendarium * Aros, Mull, the location of Aros Castle, a ruined 13th-century castle on the Isle of Mull, Scotland *AROS Research Operating System, a free software i ...
,
MorphOS MorphOS is an AmigaOS-like computer operating system (OS). It is a mixed Proprietary software, proprietary and Open-source software, open source OS produced for the Pegasos PowerPC (PPC) processor based computer, PowerUP accelerator equipped Amig ...
and AOS4) inherit the structure (complete with metadata) of the .info files of older AmigaOS versions, and can also accept standard PNG graphic files as icon bitmaps in their .info files.
NeXT Next may refer to: Arts and entertainment Film * ''Next'' (1990 film), an animated short about William Shakespeare * ''Next'' (2007 film), a sci-fi film starring Nicolas Cage * '' Next: A Primer on Urban Painting'', a 2005 documentary film Lit ...
operating systems
NeXTSTEP NeXTSTEP is a discontinued object-oriented, multitasking operating system based on the Mach kernel and the UNIX-derived BSD. It was developed by NeXT Computer in the late 1980s and early 1990s and was initially used for its range of proprieta ...
and
OPENSTEP OpenStep is a defunct object-oriented application programming interface (API) specification for a legacy object-oriented operating system, with the basic goal of offering a NeXTSTEP-like environment on non-NeXTSTEP operating systems. OpenStep was ...
, their successor,
macOS 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 computers. Within the market of desktop and lapt ...
, and other systems like
RISC OS RISC OS is a computer operating system originally designed by Acorn Computers Ltd in Cambridge, England. First released in 1987, it was designed to run on the ARM chipset, which Acorn had designed concurrently for use in its new line of Archim ...
implemented another solution. Under these systems the resources are left in an original format, for instance, pictures are included as complete
TIFF Tag Image File Format, abbreviated TIFF or TIF, is an image file format for storing raster graphics images, popular among graphic artists, the publishing industry, and photographers. TIFF is widely supported by scanning, faxing, word processin ...
files instead of being encoded into some sort of container. These resources are then placed in a directory along with the executable code and "raw data". The directory (called a "
bundle Bundle or Bundling may refer to: * Bundling (packaging), the process of using straps to bundle up items Biology * Bundle of His, a collection of heart muscle cells specialized for electrical conduction * Bundle of Kent, an extra conduction pat ...
" or "
application directory An application directory is a grouping of software code, help files and resources that together comprise a complete software package but are presented to the user as a single object. They are currently used in RISC OS and the ROX Desktop, and a ...
") is then presented to the user as the application itself. This solution provides all of the same functionality as the resource fork, but allows the resources to be easily manipulated by any application a "resource editor" (like
ResEdit ResEdit is a discontinued developer tool application for the Apple Macintosh, used to create and edit resources directly in the Mac's resource fork architecture. It was an alternative to tools such as REdit, and the resource compiler ''Rez.'' Fo ...
) is not needed. From the command-line interface, the bundle appears to be a normal directory. This approach was not an option on the
classic Mac OS Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Macintosh family of personal computers by Apple Computer from 1984 to 2001, starting with System 1 and ending with Mac OS 9. The ...
, since the file system (
MFS MFS may refer to: Education *Miletich Fighting Systems, a mixed martial arts training camp founded by Pat Miletich *Moorestown Friends School, a private Quaker school located in Moorestown, New Jersey *Moscow Finnish School, a Finnish private sc ...
) did not support separate catalog directories. When catalog file support was included in Mac OS, with the HFS filesystem, the resource fork was retained. macOS does retain the classic Resource Manager
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
as part of its
Carbon Carbon () is a chemical element with the symbol C and atomic number 6. It is nonmetallic and tetravalent In chemistry, the valence (US spelling) or valency (British spelling) of an element is the measure of its combining capacity with o ...
libraries for backward compatibility. However, the resources themselves can now be stored in separate data files within the file system the Resource Manager now hides this implementation change from the client code.


See also

*
Fork (file system) In a computer file system, a fork is a set of data associated with a file-system object. File systems without forks only allow a single set of data for the contents, while file systems with forks allow multiple such contents. Every non-empty file mu ...


References


External links


Description of the Resource File Format




* ttps://web.archive.org/web/20061023221041/http://www.folklore.org/StoryView.py?project=Macintosh&story=The_Grand_Unified_Model.txt The Grand Unified ModelHistory of the resource fork, from folklore.org
Rezycle
Resource extraction tool
Mac OS X Services
A Mac OS X Service to delete the resource fork of a file through context menu
What's up with Mac OS X Resource forks, Extended Attributes, NTFS Streams and Dot-Underscore files?

When I save a file using SMB protocol, what information is saved in the "dot-underscore" (._) files? How is this information stored on an NTFS file system?
{{DEFAULTSORT:Resource Fork Macintosh operating systems Apple Inc. file systems