]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | .\" |
61515785 | 2 | .\" "$Id: mime.types.man 11022 2013-06-06 22:14:09Z msweet $" |
ef416fc2 | 3 | .\" |
321d8d57 | 4 | .\" mime.types man page for CUPS. |
ef416fc2 | 5 | .\" |
0fa6c7fa | 6 | .\" Copyright 2007-2013 by Apple Inc. |
bd7854cb | 7 | .\" Copyright 1997-2006 by Easy Software Products. |
ef416fc2 | 8 | .\" |
9 | .\" These coded instructions, statements, and computer programs are the | |
bc44d920 | 10 | .\" property of Apple Inc. and are protected by Federal copyright |
11 | .\" law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
12 | .\" which should have been included with this file. If this file is | |
13 | .\" file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 14 | .\" |
68b10830 | 15 | .TH mime.types 5 "CUPS" "16 May 2009" "Apple Inc." |
ef416fc2 | 16 | .SH NAME |
17 | mime.types \- mime type description file for cups | |
18 | .SH DESCRIPTION | |
19 | The \fImime.types\fR file defines the recognized file types. | |
20 | .LP | |
bd7854cb | 21 | Additional file types can be added to \fImime.types\fR or |
22 | (preferably) in additional files in the CUPS configuration | |
23 | directory with the extension ".types". | |
ef416fc2 | 24 | .LP |
bd7854cb | 25 | Each line in the \fImime.types\fR file is a comment, blank, or |
26 | rule line. Comment lines start with the # character. Rule lines | |
27 | start with the MIME type name and are optionally followed by a | |
28 | series of file recognition rules that are used to automatically | |
29 | identify print and web files: | |
ef416fc2 | 30 | .br |
31 | .nf | |
32 | ||
33 | super/type rule [ ... ruleN] | |
34 | .fi | |
68b10830 MS |
35 | MIME type names are case-insensitive and are sorted in ascending alphanumeric |
36 | order for the purposes of matching. See the "TYPE MATCHING AND PRIORITY" | |
37 | section for more information. | |
38 | .LP | |
ef416fc2 | 39 | The rules may be grouped using parenthesis, joined using "+" for a |
40 | logical AND and "," or whitespace for a logical OR, and negated using | |
41 | "!". | |
42 | .SH RULES | |
43 | Rules take two forms - a filename extension by itself and functions with test | |
44 | values inside parenthesis. The following functions are available: | |
45 | .TP 5 | |
46 | match("pattern") | |
47 | .br | |
48 | Pattern match on filename | |
49 | .TP 5 | |
50 | ascii(offset,length) | |
51 | .br | |
52 | True if bytes are valid printable ASCII (CR, NL, TAB, BS, 32-126) | |
53 | .TP 5 | |
54 | printable(offset,length) | |
55 | .br | |
56 | True if bytes are printable 8-bit chars (CR, NL, TAB, BS, 32-126, 128-254) | |
57 | .TP 5 | |
dd1abb6b MS |
58 | priority(number) |
59 | .br | |
60 | Specifies the relative priority of this MIME type. The default priority is 100. | |
61 | Larger values have higher priority while smaller values have lower priority. | |
62 | .TP 5 | |
ef416fc2 | 63 | string(offset,"string") |
64 | .br | |
65 | True if bytes are identical to string | |
66 | .TP 5 | |
67 | istring(offset,"string") | |
68 | .br | |
69 | True if a case-insensitive comparison of the bytes is identical | |
70 | .TP 5 | |
71 | char(offset,value) | |
72 | .br | |
73 | True if byte is identical | |
74 | .TP 5 | |
75 | short(offset,value) | |
76 | .br | |
77 | True if 16-bit integer is identical | |
78 | .TP 5 | |
79 | int(offset,value) | |
80 | .br | |
81 | True if 32-bit integer is identical | |
82 | .TP 5 | |
83 | locale("string") | |
84 | .br | |
85 | True if current locale matches string | |
86 | .TP 5 | |
87 | contains(offset,range,"string") | |
88 | .br | |
89 | True if the range contains the string | |
90 | .SH STRING CONSTANTS | |
91 | String constants can be specified inside quotes ("") for strings | |
92 | containing whitespace and angle brackets (<>) for hexadecimal | |
93 | strings. | |
68b10830 MS |
94 | .SH TYPE MATCHING AND PRIORITY |
95 | When CUPS needs to determine the MIME type of a given file, it checks every | |
96 | MIME type defined in the .types files. When two types have the same matching | |
97 | rules, the type chosen will depend on the type name and priority, with higher- | |
98 | priority types being used over lower-priority ones. If the types have the same | |
99 | priority, the type names are sorted alphanumerically in ascending order and the | |
100 | first type is chosen. | |
101 | .LP | |
102 | For example, if two types "text/bar" and "text/foo" are defined as matching the | |
103 | extension "doc", normally the type "text/bar" will be chosen since its name is | |
104 | alphanumerically smaller than "text/foo". However, if "text/foo" also defines a | |
105 | higher priority than "text/bar", "text/foo" will be chosen instead. | |
ef416fc2 | 106 | .SH SEE ALSO |
bd7854cb | 107 | \fIclasses.conf(5)\fR, \fIcupsd(8)\fR, \fIcupsd.conf(5)\fR, |
108 | \fImime.convs(5)\fR, \fIprinters.conf(5)\fR, | |
109 | .br | |
110 | http://localhost:631/help | |
ef416fc2 | 111 | .SH COPYRIGHT |
0fa6c7fa | 112 | Copyright 2007-2013 by Apple Inc. |
ef416fc2 | 113 | .\" |
61515785 | 114 | .\" End of "$Id: mime.types.man 11022 2013-06-06 22:14:09Z msweet $". |
ef416fc2 | 115 | .\" |