[OT] File type on UNIX

Michel Fortin michel.fortin at michelf.com
Mon Sep 20 12:19:15 PDT 2010


On 2010-09-20 13:59:35 -0400, Jonathan M Davis <jmdavisProg at gmx.com> said:

> Most of the stuff which cares about file extensions or mime types is going
> to be GUI-related and that has pretty much nothing to do with either 
> unix or posi
> x. However, it is typical for Linux systems (and I assume BSD systems) 
> to use the
> mime type primarily rather than the file extension. I had thought that Mac OS X
> was the same in that regard, but I guess not. I don't know though, since I
> don't use it.

Mac OS X applications mostly use UTIs. For files, the Uniform Type 
Identifier is determined by the file extension primarily, but can also 
be affected the executable bit being present and as a fallback by the 
older OSType metadata legacy from classic Mac OS. The UTI itself isn't 
stored with the file, it is determined on demand.

UTIs are also used to represent various data types in other parts of 
the system, notably for copy-paste and drag and drop, and files 
received from the Internet where the MIME type is mapped to a UTI.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list