luci.http.mime.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html>
  4. <head>
  5. <title>Reference</title>
  6. <link rel="stylesheet" href="../luadoc.css" type="text/css" />
  7. <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
  8. </head>
  9. <body>
  10. <div id="container">
  11. <div id="product">
  12. <div id="product_logo"></div>
  13. <div id="product_name"><big><b></b></big></div>
  14. <div id="product_description"></div>
  15. </div> <!-- id="product" -->
  16. <div id="main">
  17. <div id="navigation">
  18. <h1>LuaDoc</h1>
  19. <ul>
  20. <li><a href="../index.html">Index</a></li>
  21. </ul>
  22. <!-- Module list -->
  23. <h1>Modules</h1>
  24. <ul>
  25. <li>
  26. <a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
  27. </li>
  28. <li>
  29. <a href="../modules/luci.http.html">luci.http</a>
  30. </li>
  31. <li>
  32. <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
  33. </li>
  34. <li>
  35. <a href="../modules/luci.http.date.html">luci.http.date</a>
  36. </li>
  37. <li><strong>luci.http.mime</strong></li>
  38. <li>
  39. <a href="../modules/luci.i18n.html">luci.i18n</a>
  40. </li>
  41. <li>
  42. <a href="../modules/luci.ip.html">luci.ip</a>
  43. </li>
  44. <li>
  45. <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
  46. </li>
  47. <li>
  48. <a href="../modules/luci.json.html">luci.json</a>
  49. </li>
  50. <li>
  51. <a href="../modules/luci.jsonc.html">luci.jsonc</a>
  52. </li>
  53. <li>
  54. <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
  55. </li>
  56. <li>
  57. <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
  58. </li>
  59. <li>
  60. <a href="../modules/luci.model.uci.html">luci.model.uci</a>
  61. </li>
  62. <li>
  63. <a href="../modules/luci.rpcc.html">luci.rpcc</a>
  64. </li>
  65. <li>
  66. <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
  67. </li>
  68. <li>
  69. <a href="../modules/luci.sys.html">luci.sys</a>
  70. </li>
  71. <li>
  72. <a href="../modules/luci.sys.init.html">luci.sys.init</a>
  73. </li>
  74. <li>
  75. <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
  76. </li>
  77. <li>
  78. <a href="../modules/luci.sys.net.html">luci.sys.net</a>
  79. </li>
  80. <li>
  81. <a href="../modules/luci.sys.process.html">luci.sys.process</a>
  82. </li>
  83. <li>
  84. <a href="../modules/luci.sys.user.html">luci.sys.user</a>
  85. </li>
  86. <li>
  87. <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
  88. </li>
  89. <li>
  90. <a href="../modules/luci.util.html">luci.util</a>
  91. </li>
  92. <li>
  93. <a href="../modules/nixio.html">nixio</a>
  94. </li>
  95. <li>
  96. <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
  97. </li>
  98. <li>
  99. <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
  100. </li>
  101. <li>
  102. <a href="../modules/nixio.File.html">nixio.File</a>
  103. </li>
  104. <li>
  105. <a href="../modules/nixio.README.html">nixio.README</a>
  106. </li>
  107. <li>
  108. <a href="../modules/nixio.Socket.html">nixio.Socket</a>
  109. </li>
  110. <li>
  111. <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
  112. </li>
  113. <li>
  114. <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
  115. </li>
  116. <li>
  117. <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
  118. </li>
  119. <li>
  120. <a href="../modules/nixio.bin.html">nixio.bin</a>
  121. </li>
  122. <li>
  123. <a href="../modules/nixio.bit.html">nixio.bit</a>
  124. </li>
  125. <li>
  126. <a href="../modules/nixio.crypto.html">nixio.crypto</a>
  127. </li>
  128. <li>
  129. <a href="../modules/nixio.fs.html">nixio.fs</a>
  130. </li>
  131. </ul>
  132. <!-- File list -->
  133. </div><!-- id="navigation" -->
  134. <div id="content">
  135. <h1>Class <code>luci.http.mime</code></h1>
  136. <p></p>
  137. <h2>Functions</h2>
  138. <table class="function_list">
  139. <tr>
  140. <td class="name" nowrap><a href="#to_ext">to_ext</a>&nbsp;(mimetype)</td>
  141. <td class="summary">
  142. Return corresponding extension for a given mime type or nil if the
  143. given mime-type is unknown.</td>
  144. </tr>
  145. <tr>
  146. <td class="name" nowrap><a href="#to_mime">to_mime</a>&nbsp;(filename)</td>
  147. <td class="summary">
  148. Extract extension from a filename and return corresponding mime-type or
  149. "application/octet-stream" if the extension is unknown.</td>
  150. </tr>
  151. </table>
  152. <br/>
  153. <br/>
  154. <h2><a name="functions"></a>Functions</h2>
  155. <dl class="function">
  156. <dt><a name="to_ext"></a><strong>to_ext</strong>&nbsp;(mimetype)</dt>
  157. <dd>
  158. Return corresponding extension for a given mime type or nil if the
  159. given mime-type is unknown.
  160. <h3>Parameters</h3>
  161. <ul>
  162. <li>
  163. mimetype: The mimetype to retrieve the extension from
  164. </li>
  165. </ul>
  166. <h3>Return value:</h3>
  167. String with the extension or nil for unknown type
  168. </dd>
  169. <dt><a name="to_mime"></a><strong>to_mime</strong>&nbsp;(filename)</dt>
  170. <dd>
  171. Extract extension from a filename and return corresponding mime-type or
  172. "application/octet-stream" if the extension is unknown.
  173. <h3>Parameters</h3>
  174. <ul>
  175. <li>
  176. filename: The filename for which the mime type is guessed
  177. </li>
  178. </ul>
  179. <h3>Return value:</h3>
  180. String containign the determined mime type
  181. </dd>
  182. </dl>
  183. </div> <!-- id="content" -->
  184. </div> <!-- id="main" -->
  185. <div id="about">
  186. <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
  187. </div> <!-- id="about" -->
  188. </div> <!-- id="container" -->
  189. </body>
  190. </html>