Documentation/Source/eric6.Utilities.MimeTypes.html

Sun, 08 Feb 2015 13:09:00 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 08 Feb 2015 13:09:00 +0100
changeset 4101
68c26f72c0d1
parent 4097
ad2a6bd965d9
permissions
-rw-r--r--

Added the capability to show a file's mime type and to add it to the text mime types list to the project others browser and the file browser.

<!DOCTYPE html>
<html><head>
<title>eric6.Utilities.MimeTypes</title>
<meta charset="UTF-8">
<style>
body {
    background: #EDECE6;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #85774A; }
h2 { color: white; background: #85774A; }
h3 { color: white; background: #9D936E; }
h4 { color: white; background: #9D936E; }
    
a { color: #BA6D36; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>eric6.Utilities.MimeTypes</h1>
<p>
Module implementing mimetype dependent functions.
</p>
<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Functions</h3>
<table>
<tr>
<td><a href="#isTextFile">isTextFile</a></td>
<td>Function to test, if the given file is a text (i.e.</td>
</tr><tr>
<td><a href="#mimeType">mimeType</a></td>
<td>Function to get the mime type of a file.</td>
</tr>
</table>
<hr /><hr />
<a NAME="isTextFile" ID="isTextFile"></a>
<h2>isTextFile</h2>
<b>isTextFile</b>(<i>filename</i>)
<p>
    Function to test, if the given file is a text (i.e. editable) file.
</p><dl>
<dt><i>filename</i></dt>
<dd>
name of the file to be checked (string)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
flag indicating an editable file (boolean)
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr /><hr />
<a NAME="mimeType" ID="mimeType"></a>
<h2>mimeType</h2>
<b>mimeType</b>(<i>filename</i>)
<p>
    Function to get the mime type of a file.
</p><dl>
<dt><i>filename</i></dt>
<dd>
name of the file to be checked (string)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
mime type of the file (string)
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial