group__apr__filepath.html
来自「apr函数库使用手册」· HTML 代码 · 共 654 行 · 第 1/2 页
HTML
654 行
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_filepath_get </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">char ** </td>
<td class="mdname" nowrap> <em>path</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>apr_int32_t </td>
<td class="mdname" nowrap> <em>flags</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> * </td>
<td class="mdname" nowrap> <em>p</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return the default file path (for relative file names) <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>path</em> </td><td>the default path string returned </td></tr>
<tr><td></td><td valign=top><em>flags</em> </td><td>optional flag APR_FILEPATH_NATIVE to retrieve the default file path in os-native format. </td></tr>
<tr><td></td><td valign=top><em>p</em> </td><td>the pool to allocate the default path string from </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="ga3" doxytag="apr_file_info.h::apr_filepath_list_merge" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_filepath_list_merge </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">char ** </td>
<td class="mdname" nowrap> <em>liststr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="structapr__array__header__t.html">apr_array_header_t</a> * </td>
<td class="mdname" nowrap> <em>pathelts</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> * </td>
<td class="mdname" nowrap> <em>p</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Merge a list of search path components into a single search path <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>liststr</em> </td><td>the returned search path; may be NULL if <em>pathelts</em> is empty </td></tr>
<tr><td></td><td valign=top><em>pathelts</em> </td><td>the components of the search path </td></tr>
<tr><td></td><td valign=top><em>p</em> </td><td>the pool to allocate the search path from </td></tr>
</table>
</dl>
<dl compact><dt><b>Remarks:</b></dt><dd>emtpy strings in the source array are ignored. <p>
the path separator in <em>liststr</em> is system specific; e.g., ':' on Unix, ';' on Windows, etc. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga2" doxytag="apr_file_info.h::apr_filepath_list_split" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_filepath_list_split </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="structapr__array__header__t.html">apr_array_header_t</a> ** </td>
<td class="mdname" nowrap> <em>pathelts</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const char * </td>
<td class="mdname" nowrap> <em>liststr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> * </td>
<td class="mdname" nowrap> <em>p</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Split a search path into separate components <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>pathelts</em> </td><td>the returned components of the search path </td></tr>
<tr><td></td><td valign=top><em>liststr</em> </td><td>the search path (e.g., <code>getenv("PATH")</code>) </td></tr>
<tr><td></td><td valign=top><em>p</em> </td><td>the pool to allocate the array and path components from </td></tr>
</table>
</dl>
<dl compact><dt><b>Remarks:</b></dt><dd>empty path componenta do not become part of <em>pathelts</em>. <p>
the path separator in <em>liststr</em> is system specific; e.g., ':' on Unix, ';' on Windows, etc. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga1" doxytag="apr_file_info.h::apr_filepath_merge" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_filepath_merge </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">char ** </td>
<td class="mdname" nowrap> <em>newpath</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const char * </td>
<td class="mdname" nowrap> <em>rootpath</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const char * </td>
<td class="mdname" nowrap> <em>addpath</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>apr_int32_t </td>
<td class="mdname" nowrap> <em>flags</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> * </td>
<td class="mdname" nowrap> <em>p</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Merge additional file path onto the previously processed rootpath <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>newpath</em> </td><td>the merged paths returned </td></tr>
<tr><td></td><td valign=top><em>rootpath</em> </td><td>the root file path (NULL uses the current working path) </td></tr>
<tr><td></td><td valign=top><em>addpath</em> </td><td>the path to add to the root path </td></tr>
<tr><td></td><td valign=top><em>flags</em> </td><td>the desired APR_FILEPATH_ rules to apply when merging </td></tr>
<tr><td></td><td valign=top><em>p</em> </td><td>the pool to allocate the new path string from </td></tr>
</table>
</dl>
<dl compact><dt><b>Remarks:</b></dt><dd>if the flag APR_FILEPATH_TRUENAME is given, and the addpath contains wildcard characters ('*', '?') on platforms that don't support such characters within filenames, the paths will be merged, but the result code will be APR_EPATHWILD, and all further segments will not reflect the true filenames including the wildcard and following segments. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga0" doxytag="apr_file_info.h::apr_filepath_root" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_filepath_root </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const char ** </td>
<td class="mdname" nowrap> <em>rootpath</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const char ** </td>
<td class="mdname" nowrap> <em>filepath</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>apr_int32_t </td>
<td class="mdname" nowrap> <em>flags</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> * </td>
<td class="mdname" nowrap> <em>p</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Extract the rootpath from the given filepath <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>rootpath</em> </td><td>the root file path returned with APR_SUCCESS or APR_EINCOMPLETE </td></tr>
<tr><td></td><td valign=top><em>filepath</em> </td><td>the pathname to parse for its root component </td></tr>
<tr><td></td><td valign=top><em>flags</em> </td><td>the desired rules to apply, from <pre>
APR_FILEPATH_NATIVE Use native path seperators (e.g. '\' on Win32)
APR_FILEPATH_TRUENAME Tests that the root exists, and makes it proper
</pre> </td></tr>
<tr><td></td><td valign=top><em>p</em> </td><td>the pool to allocate the new path string from </td></tr>
</table>
</dl>
<dl compact><dt><b>Remarks:</b></dt><dd>on return, filepath points to the first non-root character in the given filepath. In the simplest example, given a filepath of "/foo", returns the rootpath of "/" and filepath points at "foo". This is far more complex on other platforms, which will canonicalize the root form to a consistant format, given the APR_FILEPATH_TRUENAME flag, and also test for the validity of that root (e.g., that a drive d:/ or network share //machine/foovol/). The function returns APR_ERELATIVE if filepath isn't rooted (an error), APR_EINCOMPLETE if the root path is ambigious (but potentially legitimate, e.g. "/" on Windows is incomplete because it doesn't specify the drive letter), or APR_EBADPATH if the root is simply invalid. APR_SUCCESS is returned if filepath is an absolute path. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga5" doxytag="apr_file_info.h::apr_filepath_set" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_filepath_set </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const char * </td>
<td class="mdname" nowrap> <em>path</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> * </td>
<td class="mdname" nowrap> <em>p</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set the default file path (for relative file names) <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>path</em> </td><td>the default path returned </td></tr>
<tr><td></td><td valign=top><em>p</em> </td><td>the pool to allocate any working storage </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Mon Feb 7 13:18:25 2005 for Apache Portable Runtime by
<a href="../../../www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?