File association

A file association associates a file with an application capable of opening that file. More commonly, a file association associates a class of files (usually determined by their filename extension, such as .txt) with a corresponding application (such as a text editor) - wikipedia

Most operating systems support file associations in some form or the other. For example, opening a file from a file manager usually invokes the ''open'' verb in order to open the file with its associated application. The "open" verb invokes the associated application program, which reads the file or document and presents it to the user for viewing, and possibly for editing or other action - wikipedia

Additional actions such as ''print'' are usually accessed via a right-click context menu. A mechanism for modifying associations is also usually present. An example for this is the ''Open With'' option in the Windows Shell.

# Mac OS

Application bundles in OS X declare supported file types in their Info.plist file. For each of these specified types, a Uniform Type Identifier is given, along with a list of 'tags' which define how a file or data of this type could be identified.

* Change the Default Application on OSX - osxdaily.com

For example, the JPEG type is defined with a UTI of 'public.jpeg', and tagged with the extensions 'jpg' and 'jpeg', the MIME type 'image/jpeg' and the type code 'JPEG'.

The operating system uses this information to generate a list of applications which are able to open each type. Within Finder (software) each file will be identified with a UTI and open with the default application for that type. The user may also select from a list of other applications which support the type.

Using this system, types are also associated with data for which there is no file name or the file extension is missing. This includes pasteboard data and data streaming over a protocol such as HTTP where a MIME type has been given.

# Linux

Linux-based GUIs, such as KDE and GNOME, support MIME type (Internet media type)-based associations. For example, the MIME type <code>text/plain</code> would be associated with a text editor - wikipedia

# Microsoft Windows

Windows supports file extension-based associations (beginning with Windows 3.x ). Associations are stored in Windows Registry as sets of verbs for each file extension - wikipedia

File associations can be displayed and edited using the assoc command (computing) and with the help of the ftype command it is possible to create association between file type and application which will open files of this type.

The Windows shell invokes file association actions through COM (Component Object Model), drag and drop, command line calls or through Dynamic Data Exchange.

# Classic Mac OS

Classic Mac OS used type codes and creator codes to associate each file with its corresponding application, regardless of file extension. The more recent Mac OS X also supports file extension–based associations - wikipedia