Re: HTML or XHTML - why do you use it?

> I'm curious... how does the OS determine which program to open the file with
> if there is no extension?  For example, if I have three files:
> 
> textfile
> htmlfile
> binaryfile
> 
> how does the OS know that I want to open textfile with a word processor,
> htmlfile with a user agent, and binaryfile with some other associated
> program?

On MacOS, each file has a type and creator associated with it, stored in
the filesystem.  The creator identifies the application the file should be
passed to, essentially.

On BeOS, each file has a MIME type associated with it, stored in the
filesystem.  The MIME type is used to look up the application that can handle
that file.

On Unix, the 'file' program is commonly used (when combined with a magic number
file that maps to MIME types that gives you a setup similar to BeOS).

Boris
-- 
Economists state their GNP growth projections to the
nearest tenth of a percentage point to prove they have a
sense of humor.
                             -- Edgar R. Fiedler

Received on Tuesday, 7 January 2003 18:01:26 UTC