|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Utilities.MimeTypes</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Utilities.MimeTypes</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing mimetype dependent functions. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 <tr><td>None</td></tr> |
|
23 </table> |
|
24 <h3>Functions</h3> |
|
25 |
|
26 <table> |
|
27 |
|
28 <tr> |
|
29 <td><a href="#isTextFile">isTextFile</a></td> |
|
30 <td>Function to test, if the given file is a text (i.e.</td> |
|
31 </tr> |
|
32 <tr> |
|
33 <td><a href="#mimeType">mimeType</a></td> |
|
34 <td>Function to get the mime type of a file.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <hr /> |
|
38 <hr /> |
|
39 <a NAME="isTextFile" ID="isTextFile"></a> |
|
40 <h2>isTextFile</h2> |
|
41 <b>isTextFile</b>(<i>filename</i>) |
|
42 |
|
43 <p> |
|
44 Function to test, if the given file is a text (i.e. editable) file. |
|
45 </p> |
|
46 <dl> |
|
47 |
|
48 <dt><i>filename</i> (str)</dt> |
|
49 <dd> |
|
50 name of the file to be checked |
|
51 </dd> |
|
52 </dl> |
|
53 <dl> |
|
54 <dt>Return:</dt> |
|
55 <dd> |
|
56 flag indicating an editable file |
|
57 </dd> |
|
58 </dl> |
|
59 <dl> |
|
60 <dt>Return Type:</dt> |
|
61 <dd> |
|
62 bool |
|
63 </dd> |
|
64 </dl> |
|
65 <div align="right"><a href="#top">Up</a></div> |
|
66 <hr /> |
|
67 <hr /> |
|
68 <a NAME="mimeType" ID="mimeType"></a> |
|
69 <h2>mimeType</h2> |
|
70 <b>mimeType</b>(<i>filename</i>) |
|
71 |
|
72 <p> |
|
73 Function to get the mime type of a file. |
|
74 </p> |
|
75 <dl> |
|
76 |
|
77 <dt><i>filename</i> (str)</dt> |
|
78 <dd> |
|
79 name of the file to be checked |
|
80 </dd> |
|
81 </dl> |
|
82 <dl> |
|
83 <dt>Return:</dt> |
|
84 <dd> |
|
85 mime type of the file |
|
86 </dd> |
|
87 </dl> |
|
88 <dl> |
|
89 <dt>Return Type:</dt> |
|
90 <dd> |
|
91 str |
|
92 </dd> |
|
93 </dl> |
|
94 <div align="right"><a href="#top">Up</a></div> |
|
95 <hr /> |
|
96 </body></html> |