⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class_file_module.html

📁 用c++编写http server的源码库,对socket等网络处理的代码可迅速转为己用.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>configuration options supported by <a class="el" href="class_file_module.html">FileModule</a>:<p>directory: all files within the directory will be made available <p>Reimplemented from <a class="el" href="classpion_1_1_h_t_t_p_module.html#438852ea07e92aef908c633c2de9b8bc">pion::HTTPModule</a>.<p>Definition at line <a class="el" href="_file_module_8cpp-source.html#l00040">40</a> of file <a class="el" href="_file_module_8cpp-source.html">FileModule.cpp</a>.</div></div><p><a class="anchor" name="1ad8c01c7d0253b5da3068d574169d82"></a><!-- doxytag: member="FileModule::scanDirectory" ref="1ad8c01c7d0253b5da3068d574169d82" args="(const boost::filesystem::path &amp;dir_path)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void FileModule::scanDirectory           </td>          <td>(</td>          <td class="paramtype">const boost::filesystem::path &amp;&nbsp;</td>          <td class="paramname"> <em>dir_path</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [protected]</code></td>        </tr>      </table></div><div class="memdoc"><p>adds all files within a directory to the cache<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>dir_path</em>&nbsp;</td><td>the directory to scan (sub-directories are included) </td></tr>  </table></dl><p>Definition at line <a class="el" href="_file_module_8cpp-source.html#l00349">349</a> of file <a class="el" href="_file_module_8cpp-source.html">FileModule.cpp</a>.<p>References <a class="el" href="_file_module_8cpp-source.html#l00379">addCacheEntry()</a>, <a class="el" href="_h_t_t_p_module_8hpp-source.html#l00074">pion::HTTPModule::getResource()</a>, and <a class="el" href="_file_module_8hpp-source.html#l00194">m_logger</a>.<p>Referenced by <a class="el" href="_file_module_8cpp-source.html#l00316">start()</a>.</div></div><p><a class="anchor" name="5df44719239d16aedf792fe5c9a19e5a"></a><!-- doxytag: member="FileModule::addCacheEntry" ref="5df44719239d16aedf792fe5c9a19e5a" args="(const std::string &amp;relative_path, const boost::filesystem::path &amp;file_path, const bool placeholder)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">std::pair&lt; FileModule::CacheMap::iterator, bool &gt; FileModule::addCacheEntry           </td>          <td>(</td>          <td class="paramtype">const std::string &amp;&nbsp;</td>          <td class="paramname"> <em>relative_path</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const boost::filesystem::path &amp;&nbsp;</td>          <td class="paramname"> <em>file_path</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const bool&nbsp;</td>          <td class="paramname"> <em>placeholder</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [protected]</code></td>        </tr>      </table></div><div class="memdoc"><p>adds a single file to the cache<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>relative_path</em>&nbsp;</td><td>path for the file relative to the root directory </td></tr>    <tr><td valign="top"></td><td valign="top"><em>file_path</em>&nbsp;</td><td>actual path to the file on disk </td></tr>    <tr><td valign="top"></td><td valign="top"><em>placeholder</em>&nbsp;</td><td>if true, the file's contents are not cached</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>std::pair&lt;CacheMap::iterator, bool&gt; if an entry is added to the cache, second will be true and first will point to the new entry </dd></dl><p>Definition at line <a class="el" href="_file_module_8cpp-source.html#l00379">379</a> of file <a class="el" href="_file_module_8cpp-source.html">FileModule.cpp</a>.<p>References <a class="el" href="_file_module_8cpp-source.html#l00408">findMIMEType()</a>, <a class="el" href="_file_module_8hpp-source.html#l00194">m_logger</a>, <a class="el" href="_file_module_8cpp-source.html#l00455">FileModule::DiskFile::read()</a>, and <a class="el" href="_file_module_8cpp-source.html#l00447">FileModule::DiskFile::update()</a>.<p>Referenced by <a class="el" href="_file_module_8cpp-source.html#l00349">scanDirectory()</a>, and <a class="el" href="_file_module_8cpp-source.html#l00316">start()</a>.</div></div><p><a class="anchor" name="8bd10d069624bf87d81343120aebe723"></a><!-- doxytag: member="FileModule::findMIMEType" ref="8bd10d069624bf87d81343120aebe723" args="(const std::string &amp;file_name)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">std::string FileModule::findMIMEType           </td>          <td>(</td>          <td class="paramtype">const std::string &amp;&nbsp;</td>          <td class="paramname"> <em>file_name</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [static, protected]</code></td>        </tr>      </table></div><div class="memdoc"><p>searches for a MIME type that matches a file<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>file_name</em>&nbsp;</td><td>name of the file to search for </td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>MIME type corresponding with the file, or DEFAULT_MIME_TYPE if none found </dd></dl><p>Definition at line <a class="el" href="_file_module_8cpp-source.html#l00408">408</a> of file <a class="el" href="_file_module_8cpp-source.html">FileModule.cpp</a>.<p>Referenced by <a class="el" href="_file_module_8cpp-source.html#l00379">addCacheEntry()</a>, and <a class="el" href="_file_module_8cpp-source.html#l00085">handleRequest()</a>.</div></div><p><hr>The documentation for this class was generated from the following files:<ul><li>/Users/mdickey/code/libpion-export/modules/<a class="el" href="_file_module_8hpp-source.html">FileModule.hpp</a><li>/Users/mdickey/code/libpion-export/modules/<a class="el" href="_file_module_8cpp-source.html">FileModule.cpp</a></ul><hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 19 13:29:23 2007 for libpion by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -