Mac Developer Library Developer
Search

 

This manual page is for Mac OS X version 10.9

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • To learn how the manual is organized or to learn about command syntax, read the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Developer Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



mime.types(5)                                    Apple Inc.                                    mime.types(5)



NAME
       mime.types - mime type description file for cups

DESCRIPTION
       The mime.types file defines the recognized file types.

       Additional file types can be added to mime.types or (preferably) in additional files in the CUPS con-figuration configuration
       figuration directory with the extension ".types".

       Each line in the mime.types file is a comment, blank, or rule line. Comment lines start  with  the  #
       character.  Rule  lines start with the MIME type name and are optionally followed by a series of file
       recognition rules that are used to automatically identify print and web files:

           super/type rule [ ... ruleN]
       MIME type names are case-insensitive and are sorted in ascending alphanumeric order for the  purposes
       of matching. See the "TYPE MATCHING AND PRIORITY" section for more information.

       The  rules may be grouped using parenthesis, joined using "+" for a logical AND and "," or whitespace
       for a logical OR, and negated using "!".

RULES
       Rules take two forms - a filename extension by itself and functions with test values inside parenthe-sis. parenthesis.
       sis. The following functions are available:

       match("pattern")
            Pattern match on filename

       ascii(offset,length)
            True if bytes are valid printable ASCII (CR, NL, TAB, BS, 32-126)

       printable(offset,length)
            True if bytes are printable 8-bit chars (CR, NL, TAB, BS, 32-126, 128-254)

       priority(number)
            Specifies  the  relative priority of this MIME type. The default priority is 100.  Larger values
            have higher priority while smaller values have lower priority.

       string(offset,"string")
            True if bytes are identical to string

       istring(offset,"string")
            True if a case-insensitive comparison of the bytes is identical

       char(offset,value)
            True if byte is identical

       short(offset,value)
            True if 16-bit integer is identical

       int(offset,value)
            True if 32-bit integer is identical

       locale("string")
            True if current locale matches string

       contains(offset,range,"string")
            True if the range contains the string

STRING CONSTANTS
       String constants can be specified inside quotes ("") for  strings  containing  whitespace  and  angle
       brackets (<>) for hexadecimal strings.

TYPE MATCHING AND PRIORITY
       When  CUPS needs to determine the MIME type of a given file, it checks every MIME type defined in the
       .types files. When two types have the same matching rules, the type chosen will depend  on  the  type
       name and priority, with higher- priority types being used over lower-priority ones. If the types have
       the same priority, the type names are sorted alphanumerically in ascending order and the  first  type
       is chosen.

       For example, if two types "text/bar" and "text/foo" are defined as matching the extension "doc", nor-mally normally
       mally the type "text/bar" will be chosen since its name is alphanumerically smaller than  "text/foo".
       However,  if  "text/foo"  also  defines  a higher priority than "text/bar", "text/foo" will be chosen
       instead.

SEE ALSO
       classes.conf(5), cupsd(8), cupsd.conf(5), mime.convs(5), printers.conf(5),
       http://localhost:631/help

COPYRIGHT
       Copyright 2007-2013 by Apple Inc.



16 May 2009                                         CUPS                                       mime.types(5)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Feedback