📄 apr__file__info_8h-source.html
字号:
00282 <span class="comment"></span>
00283 <span class="comment">/** Cause apr_filepath_merge to fail if addpath is above rootpath,</span>
00284 <span class="comment"> * even given a rootpath /foo/bar and an addpath ../bar/bash</span>
00285 <span class="comment"> */</span>
<a name="l00286"></a><a class="code" href="group__apr__filepath.html#ga9">00286</a> #define APR_FILEPATH_SECUREROOT 0x03
00287 <span class="comment"></span>
00288 <span class="comment">/** Fail apr_filepath_merge if the merged path is relative */</span>
<a name="l00289"></a><a class="code" href="group__apr__filepath.html#ga10">00289</a> #define APR_FILEPATH_NOTRELATIVE 0x04
00290 <span class="comment"></span>
00291 <span class="comment">/** Fail apr_filepath_merge if the merged path is absolute */</span>
<a name="l00292"></a><a class="code" href="group__apr__filepath.html#ga11">00292</a> #define APR_FILEPATH_NOTABSOLUTE 0x08
00293 <span class="comment"></span>
00294 <span class="comment">/** Return the file system's native path format (e.g. path delimiters</span>
00295 <span class="comment"> * of ':' on MacOS9, '\' on Win32, etc.) */</span>
<a name="l00296"></a><a class="code" href="group__apr__filepath.html#ga12">00296</a> #define APR_FILEPATH_NATIVE 0x10
00297 <span class="comment"></span>
00298 <span class="comment">/** Resolve the true case of existing directories and file elements</span>
00299 <span class="comment"> * of addpath, (resolving any aliases on Win32) and append a proper </span>
00300 <span class="comment"> * trailing slash if a directory</span>
00301 <span class="comment"> */</span>
<a name="l00302"></a><a class="code" href="group__apr__filepath.html#ga13">00302</a> #define APR_FILEPATH_TRUENAME 0x20
00303 <span class="comment"></span>
00304 <span class="comment">/**</span>
00305 <span class="comment"> * Extract the rootpath from the given filepath</span>
00306 <span class="comment"> * @param rootpath the root file path returned with APR_SUCCESS or APR_EINCOMPLETE</span>
00307 <span class="comment"> * @param filepath the pathname to parse for its root component</span>
00308 <span class="comment"> * @param flags the desired rules to apply, from</span>
00309 <span class="comment"> * <PRE></span>
00310 <span class="comment"> * APR_FILEPATH_NATIVE Use native path seperators (e.g. '\' on Win32)</span>
00311 <span class="comment"> * APR_FILEPATH_TRUENAME Tests that the root exists, and makes it proper</span>
00312 <span class="comment"> * </PRE></span>
00313 <span class="comment"> * @param p the pool to allocate the new path string from</span>
00314 <span class="comment"> * @remark on return, filepath points to the first non-root character in the</span>
00315 <span class="comment"> * given filepath. In the simplest example, given a filepath of "/foo", </span>
00316 <span class="comment"> * returns the rootpath of "/" and filepath points at "foo". This is far </span>
00317 <span class="comment"> * more complex on other platforms, which will canonicalize the root form</span>
00318 <span class="comment"> * to a consistant format, given the APR_FILEPATH_TRUENAME flag, and also</span>
00319 <span class="comment"> * test for the validity of that root (e.g., that a drive d:/ or network </span>
00320 <span class="comment"> * share //machine/foovol/). </span>
00321 <span class="comment"> * The function returns APR_ERELATIVE if filepath isn't rooted (an</span>
00322 <span class="comment"> * error), APR_EINCOMPLETE if the root path is ambigious (but potentially</span>
00323 <span class="comment"> * legitimate, e.g. "/" on Windows is incomplete because it doesn't specify</span>
00324 <span class="comment"> * the drive letter), or APR_EBADPATH if the root is simply invalid.</span>
00325 <span class="comment"> * APR_SUCCESS is returned if filepath is an absolute path.</span>
00326 <span class="comment"> */</span>
00327 APR_DECLARE(apr_status_t) apr_filepath_root(const <span class="keywordtype">char</span> **rootpath,
00328 const <span class="keywordtype">char</span> **filepath,
00329 apr_int32_t flags,
00330 apr_pool_t *p);
00331 <span class="comment"></span>
00332 <span class="comment">/**</span>
00333 <span class="comment"> * Merge additional file path onto the previously processed rootpath</span>
00334 <span class="comment"> * @param newpath the merged paths returned</span>
00335 <span class="comment"> * @param rootpath the root file path (NULL uses the current working path)</span>
00336 <span class="comment"> * @param addpath the path to add to the root path</span>
00337 <span class="comment"> * @param flags the desired APR_FILEPATH_ rules to apply when merging</span>
00338 <span class="comment"> * @param p the pool to allocate the new path string from</span>
00339 <span class="comment"> * @remark if the flag APR_FILEPATH_TRUENAME is given, and the addpath </span>
00340 <span class="comment"> * contains wildcard characters ('*', '?') on platforms that don't support </span>
00341 <span class="comment"> * such characters within filenames, the paths will be merged, but the </span>
00342 <span class="comment"> * result code will be APR_EPATHWILD, and all further segments will not</span>
00343 <span class="comment"> * reflect the true filenames including the wildcard and following segments.</span>
00344 <span class="comment"> */</span>
00345 APR_DECLARE(apr_status_t) apr_filepath_merge(<span class="keywordtype">char</span> **newpath,
00346 const <span class="keywordtype">char</span> *rootpath,
00347 const <span class="keywordtype">char</span> *addpath,
00348 apr_int32_t flags,
00349 apr_pool_t *p);
00350 <span class="comment"></span>
00351 <span class="comment">/**</span>
00352 <span class="comment"> * Split a search path into separate components</span>
00353 <span class="comment"> * @param pathelts the returned components of the search path</span>
00354 <span class="comment"> * @param liststr the search path (e.g., <tt>getenv("PATH")</tt>)</span>
00355 <span class="comment"> * @param p the pool to allocate the array and path components from</span>
00356 <span class="comment"> * @remark empty path componenta do not become part of @a pathelts.</span>
00357 <span class="comment"> * @remark the path separator in @a liststr is system specific;</span>
00358 <span class="comment"> * e.g., ':' on Unix, ';' on Windows, etc.</span>
00359 <span class="comment"> */</span>
00360 APR_DECLARE(apr_status_t) apr_filepath_list_split(<a class="code" href="structapr__array__header__t.html">apr_array_header_t</a> **pathelts,
00361 const <span class="keywordtype">char</span> *liststr,
00362 apr_pool_t *p);
00363 <span class="comment"></span>
00364 <span class="comment">/**</span>
00365 <span class="comment"> * Merge a list of search path components into a single search path</span>
00366 <span class="comment"> * @param liststr the returned search path; may be NULL if @a pathelts is empty</span>
00367 <span class="comment"> * @param pathelts the components of the search path</span>
00368 <span class="comment"> * @param p the pool to allocate the search path from</span>
00369 <span class="comment"> * @remark emtpy strings in the source array are ignored.</span>
00370 <span class="comment"> * @remark the path separator in @a liststr is system specific;</span>
00371 <span class="comment"> * e.g., ':' on Unix, ';' on Windows, etc.</span>
00372 <span class="comment"> */</span>
00373 APR_DECLARE(apr_status_t) apr_filepath_list_merge(<span class="keywordtype">char</span> **liststr,
00374 <a class="code" href="structapr__array__header__t.html">apr_array_header_t</a> *pathelts,
00375 apr_pool_t *p);
00376 <span class="comment"></span>
00377 <span class="comment">/**</span>
00378 <span class="comment"> * Return the default file path (for relative file names)</span>
00379 <span class="comment"> * @param path the default path string returned</span>
00380 <span class="comment"> * @param flags optional flag APR_FILEPATH_NATIVE to retrieve the</span>
00381 <span class="comment"> * default file path in os-native format.</span>
00382 <span class="comment"> * @param p the pool to allocate the default path string from</span>
00383 <span class="comment"> */</span>
00384 APR_DECLARE(apr_status_t) apr_filepath_get(<span class="keywordtype">char</span> **path, apr_int32_t flags,
00385 apr_pool_t *p);
00386 <span class="comment"></span>
00387 <span class="comment">/**</span>
00388 <span class="comment"> * Set the default file path (for relative file names)</span>
00389 <span class="comment"> * @param path the default path returned</span>
00390 <span class="comment"> * @param p the pool to allocate any working storage</span>
00391 <span class="comment"> */</span>
00392 APR_DECLARE(apr_status_t) apr_filepath_set(const <span class="keywordtype">char</span> *path, apr_pool_t *p);
00393 <span class="comment"></span>
00394 <span class="comment">/** The FilePath character encoding is unknown */</span>
<a name="l00395"></a><a class="code" href="group__apr__filepath.html#ga14">00395</a> #define APR_FILEPATH_ENCODING_UNKNOWN 0
00396 <span class="comment"></span>
00397 <span class="comment">/** The FilePath character encoding is locale-dependent */</span>
<a name="l00398"></a><a class="code" href="group__apr__filepath.html#ga15">00398</a> #define APR_FILEPATH_ENCODING_LOCALE 1
00399 <span class="comment"></span>
00400 <span class="comment">/** The FilePath character encoding is UTF-8 */</span>
<a name="l00401"></a><a class="code" href="group__apr__filepath.html#ga16">00401</a> #define APR_FILEPATH_ENCODING_UTF8 2
00402 <span class="comment"></span>
00403 <span class="comment">/**</span>
00404 <span class="comment"> * Determine the encoding used internally by the FilePath functions</span>
00405 <span class="comment"> * @param style points to a variable which receives the encoding style flag</span>
00406 <span class="comment"> * @param p the pool to allocate any working storage</span>
00407 <span class="comment"> * @remark Use @c apr_os_locale_encoding and/or @c apr_os_default_encoding</span>
00408 <span class="comment"> * to get the name of the path encoding if it's not UTF-8.</span>
00409 <span class="comment"> */</span>
00410 APR_DECLARE(apr_status_t) apr_filepath_encoding(<span class="keywordtype">int</span> *style, apr_pool_t *p);<span class="comment"></span>
00411 <span class="comment">/** @} */</span>
00412 <span class="comment"></span>
00413 <span class="comment">/** @} */</span>
00414
00415 #ifdef __cplusplus
00416 }
00417 #endif
00418
00419 #endif <span class="comment">/* ! APR_FILE_INFO_H */</span>
</div></pre><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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -