1mime.types(5)                     Apple Inc.                     mime.types(5)
2
3
4

NAME

6       mime.types - mime type description file for cups
7

DESCRIPTION

9       The mime.types file defines the recognized file types.
10
11       Additional  file  types  can  be added to mime.types or (preferably) in
12       additional files in the CUPS configuration directory with the extension
13       ".types".
14
15       Each  line  in  the  mime.types file is a comment, blank, or rule line.
16       Comment lines start with the # character. Rule  lines  start  with  the
17       MIME type name and are optionally followed by a series of file recogni‐
18       tion rules that are used to automatically identify print and web files:
19
20           super/type rule [ ... ruleN]
21       MIME type names  are  case-insensitive  and  are  sorted  in  ascending
22       alphanumeric order for the purposes of matching. See the "TYPE MATCHING
23       AND PRIORITY" section for more information.
24
25       The rules may be grouped using parenthesis, joined using "+" for a log‐
26       ical AND and "," or whitespace for a logical OR, and negated using "!".
27

RULES

29       Rules  take  two  forms  - a filename extension by itself and functions
30       with test values inside parenthesis. The following functions are avail‐
31       able:
32
33       match("pattern")
34            Pattern match on filename
35
36       ascii(offset,length)
37            True if bytes are valid printable ASCII (CR, NL, TAB, BS, 32-126)
38
39       printable(offset,length)
40            True  if bytes are printable 8-bit chars (CR, NL, TAB, BS, 32-126,
41            128-254)
42
43       priority(number)
44            Specifies the relative priority of this  MIME  type.  The  default
45            priority is 100.  Larger values have higher priority while smaller
46            values have lower priority.
47
48       string(offset,"string")
49            True if bytes are identical to string
50
51       istring(offset,"string")
52            True if a case-insensitive comparison of the bytes is identical
53
54       char(offset,value)
55            True if byte is identical
56
57       short(offset,value)
58            True if 16-bit integer is identical
59
60       int(offset,value)
61            True if 32-bit integer is identical
62
63       locale("string")
64            True if current locale matches string
65
66       contains(offset,range,"string")
67            True if the range contains the string
68

STRING CONSTANTS

70       String constants can be specified inside quotes ("") for  strings  con‐
71       taining whitespace and angle brackets (<>) for hexadecimal strings.
72

TYPE MATCHING AND PRIORITY

74       When  CUPS  needs to determine the MIME type of a given file, it checks
75       every MIME type defined in the .types files. When two  types  have  the
76       same  matching  rules, the type chosen will depend on the type name and
77       priority, with higher- priority types being  used  over  lower-priority
78       ones.  If  the  types have the same priority, the type names are sorted
79       alphanumerically in ascending order and the first type is chosen.
80
81       For example, if two types "text/bar"  and  "text/foo"  are  defined  as
82       matching the extension "doc", normally the type "text/bar" will be cho‐
83       sen since its name is alphanumerically smaller  than  "text/foo".  How‐
84       ever,  if  "text/foo"  also  defines a higher priority than "text/bar",
85       "text/foo" will be chosen instead.
86

SEE ALSO

88       classes.conf(5),   cupsd(8),   cupsd.conf(5),   mime.convs(5),   print‐
89       ers.conf(5),
90       http://localhost:631/help
91
93       Copyright 2007-2009 by Apple Inc.
94
95
96
9716 May 2009                          CUPS                        mime.types(5)
Impressum