On 26/08/14 18:00, Michael DeHaan wrote:
> Extensions shouldn't be made to be significant, IMHO. That's a little old-school-windowsey.
That's still in very widespread use, and not only in Windows-based environments, and it's vastly
more robust than trying to deal in potentially-colliding magic numbers; e.g., the latter means
hooking up to existing preprocessing systems that attempt to ensure that all output files will
be interpreted within a restricted set of types by name becomes impossible. ("widespread" here
includes things like Apache and nginx both frequently being configured to use such a mapping
by default.)
Filesystem-level extended attributes would be cleaner than encoding in the name, but are less
convenient to output in a lot of environments. magic(4) (including file(1)) could be really
dangerous here; you might be able to play around with filtering the set of recognized types,
but egh.
Modern GNU/Linux machines often have /etc/mime.types, which maps extensions to media types.
---> Drake Wilson