43 lines
6.9 KiB
HTML
43 lines
6.9 KiB
HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Be Book - System Overview - The Storage Kit</title><link rel="stylesheet" href="be_book.css" type="text/css" media="all" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./images/favicon.ico" /><!--[if IE]>
|
||
<link rel="stylesheet" type="text/css" href="be_book_ie.css" />
|
||
<![endif]--><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="Access, BeOS, BeBook, API" /><link rel="start" href="index.html" title="The Be Book" /><link rel="up" href="TheStorageKit_Overview.html" title="The Storage Kit" /><link rel="prev" href="TheStorageKit_Overview_Entries_And_Nodes.html" title="Entries And Nodes" /><link rel="next" href="BAppFileInfo_Overview.html" title="BAppFileInfo" /></head><body><div id="header"><div id="headerT"><div id="headerTL"><a accesskey="p" href="TheStorageKit_Overview_Entries_And_Nodes.html" title="Entries And Nodes"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a accesskey="u" href="TheStorageKit_Overview.html" title="The Storage Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a accesskey="n" href="BAppFileInfo_Overview.html" title="BAppFileInfo"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="headerTR"><div id="navigpeople"><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div><div class="navigboxed" id="navigindex"><a accesskey="i" href="ClassIndex.html" title="Index">I</a></div><div class="navigboxed" id="naviglang" title="English">en</div></div><div id="headerTC">The Be Book - System Overview - The Storage Kit</div></div><div id="headerB">Prev: <a href="TheStorageKit_Overview_Entries_And_Nodes.html">Entries And Nodes</a> Up: <a href="TheStorageKit_Overview.html">The Storage Kit</a> Next: <a href="BAppFileInfo_Overview.html">BAppFileInfo</a></div><hr /></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h2 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheStorageKit_Overview_Mime_And_File_Types"></a>Mime And File Types</h2></div></div></div><p>
|
||
MIME (Multipurpose Internet Mail Extensions) is a way to describe the
|
||
content or intent of a parcel of data. As the name implies, MIME was
|
||
invented to make e-mail smarter: Want to send a GIF image through e-mail?
|
||
If your mail program understands MIME, it can encode the image, tag it
|
||
with a MIME string (in this case, "image/gif"), as well as some other
|
||
header information (such as the encoding protocol) before sending the
|
||
message out across the wires. Any MIME-savvy recipient program will be
|
||
able to properly display the message based (primarily) on the
|
||
content-type string.
|
||
</p><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="id601281"></a>MIME in the BeOS</h3></div></div></div><p>
|
||
The Be file system adds a MIME string to every file in the (native) file
|
||
system, and tries to figure out an appropriate MIME type for foreign
|
||
files, as well. MIME types are used by the Tracker, for example, to
|
||
figure out what icon it should use to represent a particular file.
|
||
Another example: When the user double-clicks a file, the MIME type (for
|
||
that file) is used to identify the application that will open the file.
|
||
Your application can perform similar deductions: When the user drag-drops
|
||
a file, your application can look at the file's MIME type and proceed (or
|
||
reject) accordingly.
|
||
</p><p>
|
||
There are two parts to Be's MIME support:
|
||
</p><dl class="variablelist"><dt><span class="term">File Types.</span></dt><dd><p>The first part is the inclusion of a MIME string as part
|
||
of every file, as mentioned above. This is called the file's file type.
|
||
The MIME string is added as an attribute—it's not part of the
|
||
file's data. Every file—whether it's a document, an application,
|
||
or even a directory has its own file type attribute. For more on
|
||
getting and setting a file's type, see the
|
||
<a class="link" href="BNodeInfo.html" title="BNodeInfo"><code class="classname">BNodeInfo</code></a> class.</p></dd><dt><span class="term">The File Type Database.</span></dt><dd><p>The second part is the system's File Type
|
||
database. The database contains information about the file types that
|
||
the system recognizes. The user can get to the database through the
|
||
FileTypes preferences application. Programmatically, you access it
|
||
through the
|
||
<a class="link" href="BMimeType.html" title="BMimeType"><code class="classname">BMimeType</code></a> and
|
||
<a class="link" href="BAppFileInfo.html" title="BAppFileInfo"><code class="classname">BAppFileInfo</code></a>
|
||
classes.</p></dd></dl></div></div><div id="footer"><hr /><div id="footerT">Prev: <a href="TheStorageKit_Overview_Entries_And_Nodes.html">Entries And Nodes</a> Up: <a href="TheStorageKit_Overview.html">The Storage Kit</a> Next: <a href="BAppFileInfo_Overview.html">BAppFileInfo</a> </div><div id="footerB"><div id="footerBL"><a href="TheStorageKit_Overview_Entries_And_Nodes.html" title="Entries And Nodes"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a href="TheStorageKit_Overview.html" title="The Storage Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a href="BAppFileInfo_Overview.html" title="BAppFileInfo"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="footerBR"><div><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div></div><div id="footerBC"><a href="http://www.access-company.com/home.html" title="ACCESS Co."><img alt="Access Company" src="./images/access_logo.png" /></a></div></div></div><div id="licenseFooter"><div id="licenseFooterBL"><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/" title="Creative Commons License"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by-nc-nd/3.0/88x31.png" /></a></div><div id="licenseFooterBR"><a href="./LegalNotice.html">Legal Notice</a></div><div id="licenseFooterBC"><span id="licenseText">This work is licensed under a
|
||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative
|
||
Commons Attribution-Non commercial-No Derivative Works 3.0 License</a>.</span></div></div></body></html>
|