@Doug Harris' answer is only partially correct. The defaults system stores your local additions or overrides to the file associations. However, OS X comes with some default, system wide associations.
If you run lsregister -dump
you'll see what Launch Services calls CoreTypes
and the associations provided by applications it finds.
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Versions/Current/Support/lsregister -dump
I haven't exhaustively scanned the output. There may be others sources indicated in that dump, but a large number of these types come from /System/Library/CoreServices/CoreTypes.bundle
. There may be a plaintext or plist file in there where the types are enumerated. The associations I believe come from scanning the contents of *.app in known application locations. Here's where Launch Services understands TextWrangler is an editor to numerous file types:
--------------------------------------------------------------------------------
bundle id: 10928
path: /Applications/TextWrangler.app
name: TextWrangler
identifier: com.barebones.textwrangler (0x8000008d)
...
library items:
--------------------------------------------------------
claim id: 20216
name: TextWrangler text document
rank: Default
roles: Editor
flags: relative-icon-path
icon: Contents/Resources/TextWranglerTextDoc.icns
bindings: .a, .asm, .asp, .bashrc, .c, .c++, .cc, .cfm, .conf, .cp, .cpp, .cshrc, .css, .cxx, .equ, .f, .f77, .for, .ftn, .h, .h++, .hpp, .htm, .html, .inc, .j, .java, .js, .jsp, .log, .m, .mm, .p, .pas, .pch, .pch++, .php, .php3, .pl, .plist, .plx, .pm, .ppu, .r, .rb, .rez, .rhtml, .rss, .s, .sql, .shtm, .shtml, .tcl, .tcshrc, .text, .txt, .wml, .xhtml, .xml, .xsl, .xslt, .yaml, 'TEXT'
...
some please re-tag this with "mac" and "osx" (those tags are more widely used) – Thilo – 2009-08-11T00:57:20.853
There was a discussion on meta on this but I couldn't conclude which tag wins. – Mehrdad Afshari – 2009-08-11T10:22:22.443
I suppose the best way to decide the winner is to look at the numbers. Popularity beats taxonomy on social network sites. – Thilo – 2009-08-13T01:13:33.220
See also: http://superuser.com/questions/17761/file-association-for-editing-on-a-mac (slightly different, but may also be helpful).
– Jonathan Leffler – 2009-09-16T04:58:56.603