<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Apache Portable Runtime: apr_file_io.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.7 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li id="current"><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul></div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul></div> <h1>apr_file_io.h</h1><a href="apr__file__io_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as</span> <a name="l00002"></a>00002 <span class="comment"> * applicable.</span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> <a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span> <a name="l00006"></a>00006 <span class="comment"> * You may obtain a copy of the License at</span> <a name="l00007"></a>00007 <span class="comment"> *</span> <a name="l00008"></a>00008 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> <a name="l00009"></a>00009 <span class="comment"> *</span> <a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> <a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> <a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> <a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span> <a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span> <a name="l00015"></a>00015 <span class="comment"> */</span> <a name="l00016"></a>00016 <a name="l00017"></a>00017 <span class="preprocessor">#ifndef APR_FILE_IO_H</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define APR_FILE_IO_H</span> <a name="l00019"></a>00019 <span class="preprocessor"></span><span class="comment"></span> <a name="l00020"></a>00020 <span class="comment">/**</span> <a name="l00021"></a>00021 <span class="comment"> * @file apr_file_io.h</span> <a name="l00022"></a>00022 <span class="comment"> * @brief APR File I/O Handling</span> <a name="l00023"></a>00023 <span class="comment"> */</span> <a name="l00024"></a>00024 <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="apr_8h.html">apr.h</a>"</span> <a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span> <a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="apr__time_8h.html">apr_time.h</a>"</span> <a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span> <a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="apr__file__info_8h.html">apr_file_info.h</a>"</span> <a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="apr__inherit_8h.html">apr_inherit.h</a>"</span> <a name="l00031"></a>00031 <a name="l00032"></a><a class="code" href="apr__file__io_8h.html#5e2e4908fc4f936dc5b4dc168f94559e">00032</a> <span class="preprocessor">#define APR_WANT_STDIO </span><span class="comment">/**< for SEEK_* */</span> <a name="l00033"></a><a class="code" href="apr__file__io_8h.html#3224b8f8b9277bd65de988258a1205a1">00033</a> <span class="preprocessor">#define APR_WANT_IOVEC </span><span class="comment">/**< for apr_file_writev */</span> <a name="l00034"></a>00034 <span class="preprocessor">#include "<a class="code" href="apr__want_8h.html">apr_want.h</a>"</span> <a name="l00035"></a>00035 <a name="l00036"></a>00036 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00037"></a>00037 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { <a name="l00038"></a>00038 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span> <a name="l00039"></a>00039 <span class="comment"></span> <a name="l00040"></a>00040 <span class="comment">/**</span> <a name="l00041"></a>00041 <span class="comment"> * @defgroup apr_file_io File I/O Handling Functions</span> <a name="l00042"></a>00042 <span class="comment"> * @ingroup APR </span> <a name="l00043"></a>00043 <span class="comment"> * @{</span> <a name="l00044"></a>00044 <span class="comment"> */</span> <a name="l00045"></a>00045 <span class="comment"></span> <a name="l00046"></a>00046 <span class="comment">/**</span> <a name="l00047"></a>00047 <span class="comment"> * @defgroup apr_file_open_flags File Open Flags/Routines</span> <a name="l00048"></a>00048 <span class="comment"> * @{</span> <a name="l00049"></a>00049 <span class="comment"> */</span> <a name="l00050"></a>00050 <a name="l00051"></a>00051 <span class="comment">/* Note to implementors: Values in the range 0x00100000--0x80000000</span> <a name="l00052"></a>00052 <span class="comment"> are reserved for platform-specific values. */</span> <a name="l00053"></a>00053 <a name="l00054"></a><a class="code" href="group__apr__file__open__flags.html#g7f1106bc6ddf4da37c835a4cf634e24f">00054</a> <span class="preprocessor">#define APR_FOPEN_READ 0x00001 </span><span class="comment">/**< Open the file for reading */</span> <a name="l00055"></a><a class="code" href="group__apr__file__open__flags.html#ge86bfc3b226e177f48835cca62cce854">00055</a> <span class="preprocessor">#define APR_FOPEN_WRITE 0x00002 </span><span class="comment">/**< Open the file for writing */</span> <a name="l00056"></a><a class="code" href="group__apr__file__open__flags.html#g5695aea18937becbf5bd21862c839930">00056</a> <span class="preprocessor">#define APR_FOPEN_CREATE 0x00004 </span><span class="comment">/**< Create the file if not there */</span> <a name="l00057"></a><a class="code" href="group__apr__file__open__flags.html#ge17c515fb735e7589be37102f065f4a3">00057</a> <span class="preprocessor">#define APR_FOPEN_APPEND 0x00008 </span><span class="comment">/**< Append to the end of the file */</span> <a name="l00058"></a><a class="code" href="group__apr__file__open__flags.html#gc0d1c1884dc27653e29ef45438502e31">00058</a> <span class="preprocessor">#define APR_FOPEN_TRUNCATE 0x00010 </span><span class="comment">/**< Open the file and truncate</span> <a name="l00059"></a>00059 <span class="comment"> to 0 length */</span> <a name="l00060"></a><a class="code" href="group__apr__file__open__flags.html#gd60805ce515164cbc68ca4f7e40e4974">00060</a> <span class="preprocessor">#define APR_FOPEN_BINARY 0x00020 </span><span class="comment">/**< Open the file in binary mode */</span> <a name="l00061"></a><a class="code" href="group__apr__file__open__flags.html#g397186fa9af5a1db93d1b58c159edf08">00061</a> <span class="preprocessor">#define APR_FOPEN_EXCL 0x00040 </span><span class="comment">/**< Open should fail if APR_CREATE</span> <a name="l00062"></a>00062 <span class="comment"> and file exists. */</span> <a name="l00063"></a><a class="code" href="group__apr__file__open__flags.html#gf6c8fb5d0a158fc0e5013483e9efab02">00063</a> <span class="preprocessor">#define APR_FOPEN_BUFFERED 0x00080 </span><span class="comment">/**< Open the file for buffered I/O */</span> <a name="l00064"></a><a class="code" href="group__apr__file__open__flags.html#g88416a7b64c3178e29b75e60585f5718">00064</a> <span class="preprocessor">#define APR_FOPEN_DELONCLOSE 0x00100 </span><span class="comment">/**< Delete the file after close */</span> <a name="l00065"></a><a class="code" href="group__apr__file__open__flags.html#g88592ced768559eedb72ee085a629980">00065</a> <span class="preprocessor">#define APR_FOPEN_XTHREAD 0x00200 </span><span class="comment">/**< Platform dependent tag to open</span> <a name="l00066"></a>00066 <span class="comment"> the file for use across multiple</span> <a name="l00067"></a>00067 <span class="comment"> threads */</span> <a name="l00068"></a><a class="code" href="group__apr__file__open__flags.html#g11da522eb192559ece089477b8fa330f">00068</a> <span class="preprocessor">#define APR_FOPEN_SHARELOCK 0x00400 </span><span class="comment">/**< Platform dependent support for</span> <a name="l00069"></a>00069 <span class="comment"> higher level locked read/write</span> <a name="l00070"></a>00070 <span class="comment"> access to support writes across</span> <a name="l00071"></a>00071 <span class="comment"> process/machines */</span> <a name="l00072"></a><a class="code" href="group__apr__file__open__flags.html#g5e6214d0385d7437fa226b6142c5f0d8">00072</a> <span class="preprocessor">#define APR_FOPEN_NOCLEANUP 0x00800 </span><span class="comment">/**< Do not register a cleanup</span> <a name="l00073"></a>00073 <span class="comment"> when the file is opened */</span> <a name="l00074"></a><a class="code" href="group__apr__file__open__flags.html#ge7294384e139b176c91dc6d07ca9a4a1">00074</a> <span class="preprocessor">#define APR_FOPEN_SENDFILE_ENABLED 0x01000 </span><span class="comment">/**< Advisory flag that this</span> <a name="l00075"></a>00075 <span class="comment"> file should support</span> <a name="l00076"></a>00076 <span class="comment"> apr_socket_sendfile operation */</span> <a name="l00077"></a><a class="code" href="group__apr__file__open__flags.html#gec4cd548aba28d1d11c025f00d3ebd71">00077</a> <span class="preprocessor">#define APR_FOPEN_LARGEFILE 0x04000 </span><span class="comment">/**< Platform dependent flag to enable</span> <a name="l00078"></a>00078 <span class="comment"> large file support; WARNING see</span> <a name="l00079"></a>00079 <span class="comment"> below. */</span> <a name="l00080"></a>00080 <span class="comment">/* backcompat */</span> <a name="l00081"></a><a class="code" href="group__apr__file__open__flags.html#g0df7decf9a0e848a84da1fb636a49fb8">00081</a> <span class="preprocessor">#define APR_READ APR_FOPEN_READ </span><span class="comment">/**< @deprecated @see APR_FOPEN_READ */</span> <a name="l00082"></a><a class="code" href="group__apr__file__open__flags.html#g7cf35fd1f45f524c88dd8000f2be3c78">00082</a> <span class="preprocessor">#define APR_WRITE APR_FOPEN_WRITE </span><span class="comment">/**< @deprecated @see APR_FOPEN_WRITE */</span> <a name="l00083"></a><a class="code" href="group__apr__file__open__flags.html#ga57dd0e44a303c9a82d9ef544b9bb1cd">00083</a> <span class="preprocessor">#define APR_CREATE APR_FOPEN_CREATE </span><span class="comment">/**< @deprecated @see APR_FOPEN_CREATE */</span> <a name="l00084"></a><a class="code" href="group__apr__file__open__flags.html#g5206ad1d989b86a5ba3b0e4f062e86c6">00084</a> <span class="preprocessor">#define APR_APPEND APR_FOPEN_APPEND </span><span class="comment">/**< @deprecated @see APR_FOPEN_APPEND */</span> <a name="l00085"></a><a class="code" href="group__apr__file__open__flags.html#geb8a591bfe820bbc9bee0a6bde6da22b">00085</a> <span class="preprocessor">#define APR_TRUNCATE APR_FOPEN_TRUNCATE </span><span class="comment">/**< @deprecated @see APR_FOPEN_TRUNCATE */</span> <a name="l00086"></a><a class="code" href="group__apr__file__open__flags.html#g7d74c341b379c6e54c226cd3a59488ea">00086</a> <span class="preprocessor">#define APR_BINARY APR_FOPEN_BINARY </span><span class="comment">/**< @deprecated @see APR_FOPEN_BINARY */</span> <a name="l00087"></a><a class="code" href="group__apr__file__open__flags.html#g3054e67493ebfc0f601fd043aa42d03d">00087</a> <span class="preprocessor">#define APR_EXCL APR_FOPEN_EXCL </span><span class="comment">/**< @deprecated @see APR_FOPEN_EXCL */</span> <a name="l00088"></a><a class="code" href="group__apr__file__open__flags.html#g71c4f3b6601ffa335924f1643c6cbb1c">00088</a> <span class="preprocessor">#define APR_BUFFERED APR_FOPEN_BUFFERED </span><span class="comment">/**< @deprecated @see APR_FOPEN_BUFFERED */</span> <a name="l00089"></a><a class="code" href="group__apr__file__open__flags.html#g68df91563706ef8e8aa5a63c223e7ebc">00089</a> <span class="preprocessor">#define APR_DELONCLOSE APR_FOPEN_DELONCLOSE </span><span class="comment">/**< @deprecated @see APR_FOPEN_DELONCLOSE */</span> <a name="l00090"></a><a class="code" href="group__apr__file__open__flags.html#g3132dbc1e839d7f03f77499b705dc246">00090</a> <span class="preprocessor">#define APR_XTHREAD APR_FOPEN_XTHREAD </span><span class="comment">/**< @deprecated @see APR_FOPEN_XTHREAD */</span> <a name="l00091"></a><a class="code" href="group__apr__file__open__flags.html#g603eb3afc55974368e74a69f9fef1d48">00091</a> <span class="preprocessor">#define APR_SHARELOCK APR_FOPEN_SHARELOCK </span><span class="comment">/**< @deprecated @see APR_FOPEN_SHARELOCK */</span> <a name="l00092"></a><a class="code" href="group__apr__file__open__flags.html#gbee09a6c2f84cf9535f2454951c5fd11">00092</a> <span class="preprocessor">#define APR_FILE_NOCLEANUP APR_FOPEN_NOCLEANUP </span><span class="comment">/**< @deprecated @see APR_FOPEN_NOCLEANUP */</span> <a name="l00093"></a><a class="code" href="group__apr__file__open__flags.html#g9d1febb3213f7e5803ab0854fe0a025c">00093</a> <span class="preprocessor">#define APR_SENDFILE_ENABLED APR_FOPEN_SENDFILE_ENABLED </span><span class="comment">/**< @deprecated @see APR_FOPEN_SENDFILE_ENABLED */</span> <a name="l00094"></a><a class="code" href="group__apr__file__open__flags.html#ga5a420b3f6c1a5b72d6453b12215db49">00094</a> <span class="preprocessor">#define APR_LARGEFILE APR_FOPEN_LARGEFILE </span><span class="comment">/**< @deprecated @see APR_FOPEN_LARGEFILE */</span> <a name="l00095"></a>00095 <span class="comment"></span> <a name="l00096"></a>00096 <span class="comment">/** @warning The APR_LARGEFILE flag only has effect on some platforms</span> <a name="l00097"></a>00097 <span class="comment"> * where sizeof(apr_off_t) == 4. Where implemented, it allows opening</span> <a name="l00098"></a>00098 <span class="comment"> * and writing to a file which exceeds the size which can be</span> <a name="l00099"></a>00099 <span class="comment"> * represented by apr_off_t (2 gigabytes). When a file's size does</span> <a name="l00100"></a>00100 <span class="comment"> * exceed 2Gb, apr_file_info_get() will fail with an error on the</span> <a name="l00101"></a>00101 <span class="comment"> * descriptor, likewise apr_stat()/apr_lstat() will fail on the</span> <a name="l00102"></a>00102 <span class="comment"> * filename. apr_dir_read() will fail with APR_INCOMPLETE on a</span> <a name="l00103"></a>00103 <span class="comment"> * directory entry for a large file depending on the particular</span> <a name="l00104"></a>00104 <span class="comment"> * APR_FINFO_* flags. Generally, it is not recommended to use this</span> <a name="l00105"></a>00105 <span class="comment"> * flag. */</span> <a name="l00106"></a>00106 <span class="comment"></span> <a name="l00107"></a>00107 <span class="comment">/** @} */</span> <a name="l00108"></a>00108 <span class="comment"></span> <a name="l00109"></a>00109 <span class="comment">/**</span> <a name="l00110"></a>00110 <span class="comment"> * @defgroup apr_file_seek_flags File Seek Flags</span> <a name="l00111"></a>00111 <span class="comment"> * @{</span> <a name="l00112"></a>00112 <span class="comment"> */</span> <a name="l00113"></a>00113 <a name="l00114"></a>00114 <span class="comment">/* flags for apr_file_seek */</span><span class="comment"></span> <a name="l00115"></a>00115 <span class="comment">/** Set the file position */</span> <a name="l00116"></a><a class="code" href="group__apr__file__seek__flags.html#g6696fe71cd68edb45a20dc9167c79b19">00116</a> <span class="preprocessor">#define APR_SET SEEK_SET</span> <a name="l00117"></a>00117 <span class="preprocessor"></span><span class="comment">/** Current */</span> <a name="l00118"></a><a class="code" href="group__apr__file__seek__flags.html#g54de69fdf5aaff899bc9f443f77654ed">00118</a> <span class="preprocessor">#define APR_CUR SEEK_CUR</span> <a name="l00119"></a>00119 <span class="preprocessor"></span><span class="comment">/** Go to end of file */</span> <a name="l00120"></a><a class="code" href="group__apr__file__seek__flags.html#ge5c86a66fe69cbb3b55c567184eacf0e">00120</a> <span class="preprocessor">#define APR_END SEEK_END</span> <a name="l00121"></a>00121 <span class="preprocessor"></span><span class="comment">/** @} */</span> <a name="l00122"></a>00122 <span class="comment"></span> <a name="l00123"></a>00123 <span class="comment">/**</span> <a name="l00124"></a>00124 <span class="comment"> * @defgroup apr_file_attrs_set_flags File Attribute Flags</span> <a name="l00125"></a>00125 <span class="comment"> * @{</span> <a name="l00126"></a>00126 <span class="comment"> */</span> <a name="l00127"></a>00127 <a name="l00128"></a>00128 <span class="comment">/* flags for apr_file_attrs_set */</span> <a name="l00129"></a><a class="code" href="group__apr__file__attrs__set__flags.html#g16692561b60b7fd4d414f3bd9be67849">00129</a> <span class="preprocessor">#define APR_FILE_ATTR_READONLY 0x01 </span><span class="comment">/**< File is read-only */</span> <a name="l00130"></a><a class="code" href="group__apr__file__attrs__set__flags.html#gdfc1b78d636a549562b0fbccc94d8da8">00130</a> <span class="preprocessor">#define APR_FILE_ATTR_EXECUTABLE 0x02 </span><span class="comment">/**< File is executable */</span> <a name="l00131"></a><a class="code" href="group__apr__file__attrs__set__flags.html#g7d3c9ad817c81945bf750ff2066c476f">00131</a> <span class="preprocessor">#define APR_FILE_ATTR_HIDDEN 0x04 </span><span class="comment">/**< File is hidden */</span> <a name="l00132"></a>00132 <span class="comment">/** @} */</span> <a name="l00133"></a>00133 <span class="comment"></span> <a name="l00134"></a>00134 <span class="comment">/**</span> <a name="l00135"></a>00135 <span class="comment"> * @defgroup apr_file_writev{_full} max iovec size</span> <a name="l00136"></a>00136 <span class="comment"> * @{</span> <a name="l00137"></a>00137 <span class="comment"> */</span> <a name="l00138"></a>00138 <span class="preprocessor">#if defined(DOXYGEN)</span> <a name="l00139"></a><a class="code" href="group__apr__file__writev.html#g6a08714060dbc77e78b1ce283639fec8">00139</a> <span class="preprocessor"></span><span class="preprocessor">#define APR_MAX_IOVEC_SIZE 1024 </span><span class="comment">/**< System dependent maximum </span> <a name="l00140"></a>00140 <span class="comment"> size of an iovec array */</span> <a name="l00141"></a>00141 <span class="preprocessor">#elif defined(IOV_MAX)</span> <a name="l00142"></a>00142 <span class="preprocessor"></span><span class="preprocessor">#define APR_MAX_IOVEC_SIZE IOV_MAX</span> <a name="l00143"></a>00143 <span class="preprocessor"></span><span class="preprocessor">#elif defined(MAX_IOVEC)</span> <a name="l00144"></a>00144 <span class="preprocessor"></span><span class="preprocessor">#define APR_MAX_IOVEC_SIZE MAX_IOVEC</span> <a name="l00145"></a>00145 <span class="preprocessor"></span><span class="preprocessor">#else</span> <a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor">#define APR_MAX_IOVEC_SIZE 1024</span> <a name="l00147"></a>00147 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00148"></a>00148 <span class="preprocessor"></span><span class="comment">/** @} */</span> <a name="l00149"></a>00149 <span class="comment"></span> <a name="l00150"></a>00150 <span class="comment">/** File attributes */</span> <a name="l00151"></a><a class="code" href="group__apr__file__io.html#g2b88604e6a51a6c3c5d1cd6c7fa7caf6">00151</a> <span class="keyword">typedef</span> apr_uint32_t <a class="code" href="group__apr__file__io.html#g2b88604e6a51a6c3c5d1cd6c7fa7caf6">apr_fileattrs_t</a>; <a name="l00152"></a>00152 <span class="comment"></span> <a name="l00153"></a>00153 <span class="comment">/** Type to pass as whence argument to apr_file_seek. */</span> <a name="l00154"></a><a class="code" href="group__apr__file__io.html#g9aedc084ad271ca9e8511c72b21c9e23">00154</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="group__apr__file__io.html#g9aedc084ad271ca9e8511c72b21c9e23">apr_seek_where_t</a>; <a name="l00155"></a>00155 <span class="comment"></span> <a name="l00156"></a>00156 <span class="comment">/**</span> <a name="l00157"></a>00157 <span class="comment"> * Structure for referencing files.</span> <a name="l00158"></a>00158 <span class="comment"> */</span> <a name="l00159"></a><a class="code" href="group__apr__file__io.html#g804ab64a6f58ddcc3da8d9f54b6f51c2">00159</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__file__io.html#g804ab64a6f58ddcc3da8d9f54b6f51c2">apr_file_t</a> apr_file_t; <a name="l00160"></a>00160 <a name="l00161"></a>00161 <span class="comment">/* File lock types/flags */</span><span class="comment"></span> <a name="l00162"></a>00162 <span class="comment">/**</span> <a name="l00163"></a>00163 <span class="comment"> * @defgroup apr_file_lock_types File Lock Types</span> <a name="l00164"></a>00164 <span class="comment"> * @{</span> <a name="l00165"></a>00165 <span class="comment"> */</span> <a name="l00166"></a>00166 <a name="l00167"></a><a class="code" href="group__apr__file__lock__types.html#g5e0fe164463580cb9a2bbcfa0afd35ce">00167</a> <span class="preprocessor">#define APR_FLOCK_SHARED 1 </span><span class="comment">/**< Shared lock. More than one process</span> <a name="l00168"></a>00168 <span class="comment"> or thread can hold a shared lock</span> <a name="l00169"></a>00169 <span class="comment"> at any given time. Essentially,</span> <a name="l00170"></a>00170 <span class="comment"> this is a "read lock", preventing</span> <a name="l00171"></a>00171 <span class="comment"> writers from establishing an</span> <a name="l00172"></a>00172 <span class="comment"> exclusive lock. */</span> <a name="l00173"></a><a class="code" href="group__apr__file__lock__types.html#g87fa50f835bdb02196dec1d6f4083a71">00173</a> <span class="preprocessor">#define APR_FLOCK_EXCLUSIVE 2 </span><span class="comment">/**< Exclusive lock. Only one process</span> <a name="l00174"></a>00174 <span class="comment"> may hold an exclusive lock at any</span> <a name="l00175"></a>00175 <span class="comment"> given time. This is analogous to</span> <a name="l00176"></a>00176 <span class="comment"> a "write lock". */</span> <a name="l00177"></a>00177 <a name="l00178"></a><a class="code" href="group__apr__file__lock__types.html#gd0ea7dd0e13efbd7c00b3b0166d56679">00178</a> <span class="preprocessor">#define APR_FLOCK_TYPEMASK 0x000F </span><span class="comment">/**< mask to extract lock type */</span> <a name="l00179"></a><a class="code" href="group__apr__file__lock__types.html#g40939453039edf057a6be3bfaa417d37">00179</a> <span class="preprocessor">#define APR_FLOCK_NONBLOCK 0x0010 </span><span class="comment">/**< do not block while acquiring the</span> <a name="l00180"></a>00180 <span class="comment"> file lock */</span> <a name="l00181"></a>00181 <span class="comment">/** @} */</span> <a name="l00182"></a>00182 <span class="comment"></span> <a name="l00183"></a>00183 <span class="comment">/**</span> <a name="l00184"></a>00184 <span class="comment"> * Open the specified file.</span> <a name="l00185"></a>00185 <span class="comment"> * @param newf The opened file descriptor.</span> <a name="l00186"></a>00186 <span class="comment"> * @param fname The full path to the file (using / on all systems)</span> <a name="l00187"></a>00187 <span class="comment"> * @param flag Or'ed value of:</span> <a name="l00188"></a>00188 <span class="comment"> * <PRE></span> <a name="l00189"></a>00189 <span class="comment"> * APR_READ open for reading</span> <a name="l00190"></a>00190 <span class="comment"> * APR_WRITE open for writing</span> <a name="l00191"></a>00191 <span class="comment"> * APR_CREATE create the file if not there</span> <a name="l00192"></a>00192 <span class="comment"> * APR_APPEND file ptr is set to end prior to all writes</span> <a name="l00193"></a>00193 <span class="comment"> * APR_TRUNCATE set length to zero if file exists</span> <a name="l00194"></a>00194 <span class="comment"> * APR_BINARY not a text file (This flag is ignored on </span> <a name="l00195"></a>00195 <span class="comment"> * UNIX because it has no meaning)</span> <a name="l00196"></a>00196 <span class="comment"> * APR_BUFFERED buffer the data. Default is non-buffered</span> <a name="l00197"></a>00197 <span class="comment"> * APR_EXCL return error if APR_CREATE and file exists</span> <a name="l00198"></a>00198 <span class="comment"> * APR_DELONCLOSE delete the file after closing.</span> <a name="l00199"></a>00199 <span class="comment"> * APR_XTHREAD Platform dependent tag to open the file</span> <a name="l00200"></a>00200 <span class="comment"> * for use across multiple threads</span> <a name="l00201"></a>00201 <span class="comment"> * APR_SHARELOCK Platform dependent support for higher</span> <a name="l00202"></a>00202 <span class="comment"> * level locked read/write access to support</span> <a name="l00203"></a>00203 <span class="comment"> * writes across process/machines</span> <a name="l00204"></a>00204 <span class="comment"> * APR_FILE_NOCLEANUP Do not register a cleanup with the pool </span> <a name="l00205"></a>00205 <span class="comment"> * passed in on the <EM>pool</EM> argument (see below).</span> <a name="l00206"></a>00206 <span class="comment"> * The apr_os_file_t handle in apr_file_t will not</span> <a name="l00207"></a>00207 <span class="comment"> * be closed when the pool is destroyed.</span> <a name="l00208"></a>00208 <span class="comment"> * APR_SENDFILE_ENABLED Open with appropriate platform semantics</span> <a name="l00209"></a>00209 <span class="comment"> * for sendfile operations. Advisory only,</span> <a name="l00210"></a>00210 <span class="comment"> * apr_socket_sendfile does not check this flag.</span> <a name="l00211"></a>00211 <span class="comment"> * </PRE></span> <a name="l00212"></a>00212 <span class="comment"> * @param perm Access permissions for file.</span> <a name="l00213"></a>00213 <span class="comment"> * @param pool The pool to use.</span> <a name="l00214"></a>00214 <span class="comment"> * @remark If perm is APR_OS_DEFAULT and the file is being created,</span> <a name="l00215"></a>00215 <span class="comment"> * appropriate default permissions will be used.</span> <a name="l00216"></a>00216 <span class="comment"> */</span> <a name="l00217"></a>00217 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g8a37c092c1ec653708ee948b4278a2a3">apr_file_open</a>(apr_file_t **newf, const <span class="keywordtype">char</span> *fname, <a name="l00218"></a>00218 apr_int32_t flag, <a class="code" href="group__apr__file__info.html#g7abcb02b2c5dcf95d4f12357facd9bd2">apr_fileperms_t</a> perm, <a name="l00219"></a>00219 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00220"></a>00220 <span class="comment"></span> <a name="l00221"></a>00221 <span class="comment">/**</span> <a name="l00222"></a>00222 <span class="comment"> * Close the specified file.</span> <a name="l00223"></a>00223 <span class="comment"> * @param file The file descriptor to close.</span> <a name="l00224"></a>00224 <span class="comment"> */</span> <a name="l00225"></a>00225 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g2d459c128cf3353738f8606f0efbff6f">apr_file_close</a>(apr_file_t *file); <a name="l00226"></a>00226 <span class="comment"></span> <a name="l00227"></a>00227 <span class="comment">/**</span> <a name="l00228"></a>00228 <span class="comment"> * Delete the specified file.</span> <a name="l00229"></a>00229 <span class="comment"> * @param path The full path to the file (using / on all systems)</span> <a name="l00230"></a>00230 <span class="comment"> * @param pool The pool to use.</span> <a name="l00231"></a>00231 <span class="comment"> * @remark If the file is open, it won't be removed until all</span> <a name="l00232"></a>00232 <span class="comment"> * instances are closed.</span> <a name="l00233"></a>00233 <span class="comment"> */</span> <a name="l00234"></a>00234 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g77e517ff7a45eed0ceffa30bc4e9ca99">apr_file_remove</a>(const <span class="keywordtype">char</span> *path, <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00235"></a>00235 <span class="comment"></span> <a name="l00236"></a>00236 <span class="comment">/**</span> <a name="l00237"></a>00237 <span class="comment"> * Rename the specified file.</span> <a name="l00238"></a>00238 <span class="comment"> * @param from_path The full path to the original file (using / on all systems)</span> <a name="l00239"></a>00239 <span class="comment"> * @param to_path The full path to the new file (using / on all systems)</span> <a name="l00240"></a>00240 <span class="comment"> * @param pool The pool to use.</span> <a name="l00241"></a>00241 <span class="comment"> * @warning If a file exists at the new location, then it will be</span> <a name="l00242"></a>00242 <span class="comment"> * overwritten. Moving files or directories across devices may not be</span> <a name="l00243"></a>00243 <span class="comment"> * possible.</span> <a name="l00244"></a>00244 <span class="comment"> */</span> <a name="l00245"></a>00245 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gfcfd64d200b1661c5011b8f94a75385c">apr_file_rename</a>(const <span class="keywordtype">char</span> *from_path, <a name="l00246"></a>00246 const <span class="keywordtype">char</span> *to_path, <a name="l00247"></a>00247 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00248"></a>00248 <span class="comment"></span> <a name="l00249"></a>00249 <span class="comment">/**</span> <a name="l00250"></a>00250 <span class="comment"> * Copy the specified file to another file.</span> <a name="l00251"></a>00251 <span class="comment"> * @param from_path The full path to the original file (using / on all systems)</span> <a name="l00252"></a>00252 <span class="comment"> * @param to_path The full path to the new file (using / on all systems)</span> <a name="l00253"></a>00253 <span class="comment"> * @param perms Access permissions for the new file if it is created.</span> <a name="l00254"></a>00254 <span class="comment"> * In place of the usual or'd combination of file permissions, the</span> <a name="l00255"></a>00255 <span class="comment"> * value APR_FILE_SOURCE_PERMS may be given, in which case the source</span> <a name="l00256"></a>00256 <span class="comment"> * file's permissions are copied.</span> <a name="l00257"></a>00257 <span class="comment"> * @param pool The pool to use.</span> <a name="l00258"></a>00258 <span class="comment"> * @remark The new file does not need to exist, it will be created if required.</span> <a name="l00259"></a>00259 <span class="comment"> * @warning If the new file already exists, its contents will be overwritten.</span> <a name="l00260"></a>00260 <span class="comment"> */</span> <a name="l00261"></a>00261 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g312e749e16d5f9ccd5627fcaae937d60">apr_file_copy</a>(const <span class="keywordtype">char</span> *from_path, <a name="l00262"></a>00262 const <span class="keywordtype">char</span> *to_path, <a name="l00263"></a>00263 <a class="code" href="group__apr__file__info.html#g7abcb02b2c5dcf95d4f12357facd9bd2">apr_fileperms_t</a> perms, <a name="l00264"></a>00264 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00265"></a>00265 <span class="comment"></span> <a name="l00266"></a>00266 <span class="comment">/**</span> <a name="l00267"></a>00267 <span class="comment"> * Append the specified file to another file.</span> <a name="l00268"></a>00268 <span class="comment"> * @param from_path The full path to the source file (use / on all systems)</span> <a name="l00269"></a>00269 <span class="comment"> * @param to_path The full path to the destination file (use / on all systems)</span> <a name="l00270"></a>00270 <span class="comment"> * @param perms Access permissions for the destination file if it is created.</span> <a name="l00271"></a>00271 <span class="comment"> * In place of the usual or'd combination of file permissions, the</span> <a name="l00272"></a>00272 <span class="comment"> * value APR_FILE_SOURCE_PERMS may be given, in which case the source</span> <a name="l00273"></a>00273 <span class="comment"> * file's permissions are copied.</span> <a name="l00274"></a>00274 <span class="comment"> * @param pool The pool to use.</span> <a name="l00275"></a>00275 <span class="comment"> * @remark The new file does not need to exist, it will be created if required.</span> <a name="l00276"></a>00276 <span class="comment"> */</span> <a name="l00277"></a>00277 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g5aaad7656446c945000254bf47a16408">apr_file_append</a>(const <span class="keywordtype">char</span> *from_path, <a name="l00278"></a>00278 const <span class="keywordtype">char</span> *to_path, <a name="l00279"></a>00279 <a class="code" href="group__apr__file__info.html#g7abcb02b2c5dcf95d4f12357facd9bd2">apr_fileperms_t</a> perms, <a name="l00280"></a>00280 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00281"></a>00281 <span class="comment"></span> <a name="l00282"></a>00282 <span class="comment">/**</span> <a name="l00283"></a>00283 <span class="comment"> * Are we at the end of the file</span> <a name="l00284"></a>00284 <span class="comment"> * @param fptr The apr file we are testing.</span> <a name="l00285"></a>00285 <span class="comment"> * @remark Returns APR_EOF if we are at the end of file, APR_SUCCESS otherwise.</span> <a name="l00286"></a>00286 <span class="comment"> */</span> <a name="l00287"></a>00287 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gee6be48ff3dfbd67cb1bb9118afd300d">apr_file_eof</a>(apr_file_t *fptr); <a name="l00288"></a>00288 <span class="comment"></span> <a name="l00289"></a>00289 <span class="comment">/**</span> <a name="l00290"></a>00290 <span class="comment"> * Open standard error as an apr file pointer.</span> <a name="l00291"></a>00291 <span class="comment"> * @param thefile The apr file to use as stderr.</span> <a name="l00292"></a>00292 <span class="comment"> * @param pool The pool to allocate the file out of.</span> <a name="l00293"></a>00293 <span class="comment"> * </span> <a name="l00294"></a>00294 <span class="comment"> * @remark The only reason that the apr_file_open_std* functions exist</span> <a name="l00295"></a>00295 <span class="comment"> * is that you may not always have a stderr/out/in on Windows. This</span> <a name="l00296"></a>00296 <span class="comment"> * is generally a problem with newer versions of Windows and services.</span> <a name="l00297"></a>00297 <span class="comment"> * </span> <a name="l00298"></a>00298 <span class="comment"> * @remark The other problem is that the C library functions generally work</span> <a name="l00299"></a>00299 <span class="comment"> * differently on Windows and Unix. So, by using apr_file_open_std*</span> <a name="l00300"></a>00300 <span class="comment"> * functions, you can get a handle to an APR struct that works with</span> <a name="l00301"></a>00301 <span class="comment"> * the APR functions which are supposed to work identically on all</span> <a name="l00302"></a>00302 <span class="comment"> * platforms.</span> <a name="l00303"></a>00303 <span class="comment"> */</span> <a name="l00304"></a>00304 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g331fd2de287634fc018c87749b23840e">apr_file_open_stderr</a>(apr_file_t **thefile, <a name="l00305"></a>00305 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00306"></a>00306 <span class="comment"></span> <a name="l00307"></a>00307 <span class="comment">/**</span> <a name="l00308"></a>00308 <span class="comment"> * open standard output as an apr file pointer.</span> <a name="l00309"></a>00309 <span class="comment"> * @param thefile The apr file to use as stdout.</span> <a name="l00310"></a>00310 <span class="comment"> * @param pool The pool to allocate the file out of.</span> <a name="l00311"></a>00311 <span class="comment"> * </span> <a name="l00312"></a>00312 <span class="comment"> * @remark See remarks for apr_file_open_stdout.</span> <a name="l00313"></a>00313 <span class="comment"> */</span> <a name="l00314"></a>00314 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g6465ea90172e9b67275ad5725f15ce0b">apr_file_open_stdout</a>(apr_file_t **thefile, <a name="l00315"></a>00315 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00316"></a>00316 <span class="comment"></span> <a name="l00317"></a>00317 <span class="comment">/**</span> <a name="l00318"></a>00318 <span class="comment"> * open standard input as an apr file pointer.</span> <a name="l00319"></a>00319 <span class="comment"> * @param thefile The apr file to use as stdin.</span> <a name="l00320"></a>00320 <span class="comment"> * @param pool The pool to allocate the file out of.</span> <a name="l00321"></a>00321 <span class="comment"> * </span> <a name="l00322"></a>00322 <span class="comment"> * @remark See remarks for apr_file_open_stdout.</span> <a name="l00323"></a>00323 <span class="comment"> */</span> <a name="l00324"></a>00324 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gf9a83bcf887d07112426bd42fdb4c675">apr_file_open_stdin</a>(apr_file_t **thefile, <a name="l00325"></a>00325 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00326"></a>00326 <span class="comment"></span> <a name="l00327"></a>00327 <span class="comment">/**</span> <a name="l00328"></a>00328 <span class="comment"> * Read data from the specified file.</span> <a name="l00329"></a>00329 <span class="comment"> * @param thefile The file descriptor to read from.</span> <a name="l00330"></a>00330 <span class="comment"> * @param buf The buffer to store the data to.</span> <a name="l00331"></a>00331 <span class="comment"> * @param nbytes On entry, the number of bytes to read; on exit, the number</span> <a name="l00332"></a>00332 <span class="comment"> * of bytes read.</span> <a name="l00333"></a>00333 <span class="comment"> *</span> <a name="l00334"></a>00334 <span class="comment"> * @remark apr_file_read will read up to the specified number of</span> <a name="l00335"></a>00335 <span class="comment"> * bytes, but never more. If there isn't enough data to fill that</span> <a name="l00336"></a>00336 <span class="comment"> * number of bytes, all of the available data is read. The third</span> <a name="l00337"></a>00337 <span class="comment"> * argument is modified to reflect the number of bytes read. If a</span> <a name="l00338"></a>00338 <span class="comment"> * char was put back into the stream via ungetc, it will be the first</span> <a name="l00339"></a>00339 <span class="comment"> * character returned.</span> <a name="l00340"></a>00340 <span class="comment"> *</span> <a name="l00341"></a>00341 <span class="comment"> * @remark It is not possible for both bytes to be read and an APR_EOF</span> <a name="l00342"></a>00342 <span class="comment"> * or other error to be returned. APR_EINTR is never returned.</span> <a name="l00343"></a>00343 <span class="comment"> */</span> <a name="l00344"></a>00344 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gf4201190f4feed489113053d8427ec36">apr_file_read</a>(apr_file_t *thefile, <span class="keywordtype">void</span> *buf, <a name="l00345"></a>00345 apr_size_t *nbytes); <a name="l00346"></a>00346 <span class="comment"></span> <a name="l00347"></a>00347 <span class="comment">/**</span> <a name="l00348"></a>00348 <span class="comment"> * Write data to the specified file.</span> <a name="l00349"></a>00349 <span class="comment"> * @param thefile The file descriptor to write to.</span> <a name="l00350"></a>00350 <span class="comment"> * @param buf The buffer which contains the data.</span> <a name="l00351"></a>00351 <span class="comment"> * @param nbytes On entry, the number of bytes to write; on exit, the number </span> <a name="l00352"></a>00352 <span class="comment"> * of bytes written.</span> <a name="l00353"></a>00353 <span class="comment"> *</span> <a name="l00354"></a>00354 <span class="comment"> * @remark apr_file_write will write up to the specified number of</span> <a name="l00355"></a>00355 <span class="comment"> * bytes, but never more. If the OS cannot write that many bytes, it</span> <a name="l00356"></a>00356 <span class="comment"> * will write as many as it can. The third argument is modified to</span> <a name="l00357"></a>00357 <span class="comment"> * reflect the * number of bytes written.</span> <a name="l00358"></a>00358 <span class="comment"> *</span> <a name="l00359"></a>00359 <span class="comment"> * @remark It is possible for both bytes to be written and an error to</span> <a name="l00360"></a>00360 <span class="comment"> * be returned. APR_EINTR is never returned.</span> <a name="l00361"></a>00361 <span class="comment"> */</span> <a name="l00362"></a>00362 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g5c73ff8935da9d34a90cf23a49ba7927">apr_file_write</a>(apr_file_t *thefile, const <span class="keywordtype">void</span> *buf, <a name="l00363"></a>00363 apr_size_t *nbytes); <a name="l00364"></a>00364 <span class="comment"></span> <a name="l00365"></a>00365 <span class="comment">/**</span> <a name="l00366"></a>00366 <span class="comment"> * Write data from iovec array to the specified file.</span> <a name="l00367"></a>00367 <span class="comment"> * @param thefile The file descriptor to write to.</span> <a name="l00368"></a>00368 <span class="comment"> * @param vec The array from which to get the data to write to the file.</span> <a name="l00369"></a>00369 <span class="comment"> * @param nvec The number of elements in the struct iovec array. This must </span> <a name="l00370"></a>00370 <span class="comment"> * be smaller than APR_MAX_IOVEC_SIZE. If it isn't, the function </span> <a name="l00371"></a>00371 <span class="comment"> * will fail with APR_EINVAL.</span> <a name="l00372"></a>00372 <span class="comment"> * @param nbytes The number of bytes written.</span> <a name="l00373"></a>00373 <span class="comment"> *</span> <a name="l00374"></a>00374 <span class="comment"> * @remark It is possible for both bytes to be written and an error to</span> <a name="l00375"></a>00375 <span class="comment"> * be returned. APR_EINTR is never returned.</span> <a name="l00376"></a>00376 <span class="comment"> *</span> <a name="l00377"></a>00377 <span class="comment"> * @remark apr_file_writev is available even if the underlying</span> <a name="l00378"></a>00378 <span class="comment"> * operating system doesn't provide writev().</span> <a name="l00379"></a>00379 <span class="comment"> */</span> <a name="l00380"></a>00380 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gb3bd19a7883d15063bc6ede46160f983">apr_file_writev</a>(apr_file_t *thefile, <a name="l00381"></a>00381 const struct iovec *vec, <a name="l00382"></a>00382 apr_size_t nvec, apr_size_t *nbytes); <a name="l00383"></a>00383 <span class="comment"></span> <a name="l00384"></a>00384 <span class="comment">/**</span> <a name="l00385"></a>00385 <span class="comment"> * Read data from the specified file, ensuring that the buffer is filled</span> <a name="l00386"></a>00386 <span class="comment"> * before returning.</span> <a name="l00387"></a>00387 <span class="comment"> * @param thefile The file descriptor to read from.</span> <a name="l00388"></a>00388 <span class="comment"> * @param buf The buffer to store the data to.</span> <a name="l00389"></a>00389 <span class="comment"> * @param nbytes The number of bytes to read.</span> <a name="l00390"></a>00390 <span class="comment"> * @param bytes_read If non-NULL, this will contain the number of bytes read.</span> <a name="l00391"></a>00391 <span class="comment"> *</span> <a name="l00392"></a>00392 <span class="comment"> * @remark apr_file_read will read up to the specified number of</span> <a name="l00393"></a>00393 <span class="comment"> * bytes, but never more. If there isn't enough data to fill that</span> <a name="l00394"></a>00394 <span class="comment"> * number of bytes, then the process/thread will block until it is</span> <a name="l00395"></a>00395 <span class="comment"> * available or EOF is reached. If a char was put back into the</span> <a name="l00396"></a>00396 <span class="comment"> * stream via ungetc, it will be the first character returned.</span> <a name="l00397"></a>00397 <span class="comment"> *</span> <a name="l00398"></a>00398 <span class="comment"> * @remark It is possible for both bytes to be read and an error to be</span> <a name="l00399"></a>00399 <span class="comment"> * returned. And if *bytes_read is less than nbytes, an accompanying</span> <a name="l00400"></a>00400 <span class="comment"> * error is _always_ returned.</span> <a name="l00401"></a>00401 <span class="comment"> *</span> <a name="l00402"></a>00402 <span class="comment"> * @remark APR_EINTR is never returned.</span> <a name="l00403"></a>00403 <span class="comment"> */</span> <a name="l00404"></a>00404 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gccd5cd9a83b20014cf1acb343eb15bae">apr_file_read_full</a>(apr_file_t *thefile, <span class="keywordtype">void</span> *buf, <a name="l00405"></a>00405 apr_size_t nbytes, <a name="l00406"></a>00406 apr_size_t *bytes_read); <a name="l00407"></a>00407 <span class="comment"></span> <a name="l00408"></a>00408 <span class="comment">/**</span> <a name="l00409"></a>00409 <span class="comment"> * Write data to the specified file, ensuring that all of the data is</span> <a name="l00410"></a>00410 <span class="comment"> * written before returning.</span> <a name="l00411"></a>00411 <span class="comment"> * @param thefile The file descriptor to write to.</span> <a name="l00412"></a>00412 <span class="comment"> * @param buf The buffer which contains the data.</span> <a name="l00413"></a>00413 <span class="comment"> * @param nbytes The number of bytes to write.</span> <a name="l00414"></a>00414 <span class="comment"> * @param bytes_written If non-NULL, set to the number of bytes written.</span> <a name="l00415"></a>00415 <span class="comment"> * </span> <a name="l00416"></a>00416 <span class="comment"> * @remark apr_file_write will write up to the specified number of</span> <a name="l00417"></a>00417 <span class="comment"> * bytes, but never more. If the OS cannot write that many bytes, the</span> <a name="l00418"></a>00418 <span class="comment"> * process/thread will block until they can be written. Exceptional</span> <a name="l00419"></a>00419 <span class="comment"> * error such as "out of space" or "pipe closed" will terminate with</span> <a name="l00420"></a>00420 <span class="comment"> * an error.</span> <a name="l00421"></a>00421 <span class="comment"> *</span> <a name="l00422"></a>00422 <span class="comment"> * @remark It is possible for both bytes to be written and an error to</span> <a name="l00423"></a>00423 <span class="comment"> * be returned. And if *bytes_written is less than nbytes, an</span> <a name="l00424"></a>00424 <span class="comment"> * accompanying error is _always_ returned.</span> <a name="l00425"></a>00425 <span class="comment"> *</span> <a name="l00426"></a>00426 <span class="comment"> * @remark APR_EINTR is never returned.</span> <a name="l00427"></a>00427 <span class="comment"> */</span> <a name="l00428"></a>00428 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g0dcdbd6564c474524a8f234706b2e708">apr_file_write_full</a>(apr_file_t *thefile, <a name="l00429"></a>00429 const <span class="keywordtype">void</span> *buf, <a name="l00430"></a>00430 apr_size_t nbytes, <a name="l00431"></a>00431 apr_size_t *bytes_written); <a name="l00432"></a>00432 <a name="l00433"></a>00433 <span class="comment"></span> <a name="l00434"></a>00434 <span class="comment">/**</span> <a name="l00435"></a>00435 <span class="comment"> * Write data from iovec array to the specified file, ensuring that all of the</span> <a name="l00436"></a>00436 <span class="comment"> * data is written before returning.</span> <a name="l00437"></a>00437 <span class="comment"> * @param thefile The file descriptor to write to.</span> <a name="l00438"></a>00438 <span class="comment"> * @param vec The array from which to get the data to write to the file.</span> <a name="l00439"></a>00439 <span class="comment"> * @param nvec The number of elements in the struct iovec array. This must </span> <a name="l00440"></a>00440 <span class="comment"> * be smaller than APR_MAX_IOVEC_SIZE. If it isn't, the function </span> <a name="l00441"></a>00441 <span class="comment"> * will fail with APR_EINVAL.</span> <a name="l00442"></a>00442 <span class="comment"> * @param nbytes The number of bytes written.</span> <a name="l00443"></a>00443 <span class="comment"> *</span> <a name="l00444"></a>00444 <span class="comment"> * @remark apr_file_writev_full is available even if the underlying</span> <a name="l00445"></a>00445 <span class="comment"> * operating system doesn't provide writev().</span> <a name="l00446"></a>00446 <span class="comment"> */</span> <a name="l00447"></a>00447 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g61343abf4a01221e6923a6efb2cf58cc">apr_file_writev_full</a>(apr_file_t *thefile, <a name="l00448"></a>00448 const struct iovec *vec, <a name="l00449"></a>00449 apr_size_t nvec, <a name="l00450"></a>00450 apr_size_t *nbytes);<span class="comment"></span> <a name="l00451"></a>00451 <span class="comment">/**</span> <a name="l00452"></a>00452 <span class="comment"> * Write a character into the specified file.</span> <a name="l00453"></a>00453 <span class="comment"> * @param ch The character to write.</span> <a name="l00454"></a>00454 <span class="comment"> * @param thefile The file descriptor to write to</span> <a name="l00455"></a>00455 <span class="comment"> */</span> <a name="l00456"></a>00456 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g7f704d83255567e07c4a0a8cd37aad05">apr_file_putc</a>(<span class="keywordtype">char</span> ch, apr_file_t *thefile); <a name="l00457"></a>00457 <span class="comment"></span> <a name="l00458"></a>00458 <span class="comment">/**</span> <a name="l00459"></a>00459 <span class="comment"> * Read a character from the specified file.</span> <a name="l00460"></a>00460 <span class="comment"> * @param ch The character to read into</span> <a name="l00461"></a>00461 <span class="comment"> * @param thefile The file descriptor to read from</span> <a name="l00462"></a>00462 <span class="comment"> */</span> <a name="l00463"></a>00463 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gb99b76e4b72670d3c71f2000dc097d69">apr_file_getc</a>(<span class="keywordtype">char</span> *ch, apr_file_t *thefile); <a name="l00464"></a>00464 <span class="comment"></span> <a name="l00465"></a>00465 <span class="comment">/**</span> <a name="l00466"></a>00466 <span class="comment"> * Put a character back onto a specified stream.</span> <a name="l00467"></a>00467 <span class="comment"> * @param ch The character to write.</span> <a name="l00468"></a>00468 <span class="comment"> * @param thefile The file descriptor to write to</span> <a name="l00469"></a>00469 <span class="comment"> */</span> <a name="l00470"></a>00470 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g22b88de091091aa550fccfde2bd6a8a3">apr_file_ungetc</a>(<span class="keywordtype">char</span> ch, apr_file_t *thefile); <a name="l00471"></a>00471 <span class="comment"></span> <a name="l00472"></a>00472 <span class="comment">/**</span> <a name="l00473"></a>00473 <span class="comment"> * Read a string from the specified file.</span> <a name="l00474"></a>00474 <span class="comment"> * @param str The buffer to store the string in. </span> <a name="l00475"></a>00475 <span class="comment"> * @param len The length of the string</span> <a name="l00476"></a>00476 <span class="comment"> * @param thefile The file descriptor to read from</span> <a name="l00477"></a>00477 <span class="comment"> * @remark The buffer will be NUL-terminated if any characters are stored.</span> <a name="l00478"></a>00478 <span class="comment"> */</span> <a name="l00479"></a>00479 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gc338d88805e9180cda73c6ffd44c2843">apr_file_gets</a>(<span class="keywordtype">char</span> *str, <span class="keywordtype">int</span> len, <a name="l00480"></a>00480 apr_file_t *thefile); <a name="l00481"></a>00481 <span class="comment"></span> <a name="l00482"></a>00482 <span class="comment">/**</span> <a name="l00483"></a>00483 <span class="comment"> * Write the string into the specified file.</span> <a name="l00484"></a>00484 <span class="comment"> * @param str The string to write. </span> <a name="l00485"></a>00485 <span class="comment"> * @param thefile The file descriptor to write to</span> <a name="l00486"></a>00486 <span class="comment"> */</span> <a name="l00487"></a>00487 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g4be3b760207c970c498eb33c36a565f0">apr_file_puts</a>(const <span class="keywordtype">char</span> *str, apr_file_t *thefile); <a name="l00488"></a>00488 <span class="comment"></span> <a name="l00489"></a>00489 <span class="comment">/**</span> <a name="l00490"></a>00490 <span class="comment"> * Flush the file's buffer.</span> <a name="l00491"></a>00491 <span class="comment"> * @param thefile The file descriptor to flush</span> <a name="l00492"></a>00492 <span class="comment"> */</span> <a name="l00493"></a>00493 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g9daaebc5f3041d3da764be6a43aad6ec">apr_file_flush</a>(apr_file_t *thefile); <a name="l00494"></a>00494 <span class="comment"></span> <a name="l00495"></a>00495 <span class="comment">/**</span> <a name="l00496"></a>00496 <span class="comment"> * Duplicate the specified file descriptor.</span> <a name="l00497"></a>00497 <span class="comment"> * @param new_file The structure to duplicate into. </span> <a name="l00498"></a>00498 <span class="comment"> * @param old_file The file to duplicate.</span> <a name="l00499"></a>00499 <span class="comment"> * @param p The pool to use for the new file.</span> <a name="l00500"></a>00500 <span class="comment"> * @remark *new_file must point to a valid apr_file_t, or point to NULL.</span> <a name="l00501"></a>00501 <span class="comment"> */</span> <a name="l00502"></a>00502 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gd1caad9579f8e2ac48df128bc0f59a53">apr_file_dup</a>(apr_file_t **new_file, <a name="l00503"></a>00503 apr_file_t *old_file, <a name="l00504"></a>00504 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *p); <a name="l00505"></a>00505 <span class="comment"></span> <a name="l00506"></a>00506 <span class="comment">/**</span> <a name="l00507"></a>00507 <span class="comment"> * Duplicate the specified file descriptor and close the original</span> <a name="l00508"></a>00508 <span class="comment"> * @param new_file The old file that is to be closed and reused</span> <a name="l00509"></a>00509 <span class="comment"> * @param old_file The file to duplicate</span> <a name="l00510"></a>00510 <span class="comment"> * @param p The pool to use for the new file</span> <a name="l00511"></a>00511 <span class="comment"> *</span> <a name="l00512"></a>00512 <span class="comment"> * @remark new_file MUST point at a valid apr_file_t. It cannot be NULL.</span> <a name="l00513"></a>00513 <span class="comment"> */</span> <a name="l00514"></a>00514 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g4d916c2411d30d0ca08a16c84620399b">apr_file_dup2</a>(apr_file_t *new_file, <a name="l00515"></a>00515 apr_file_t *old_file, <a name="l00516"></a>00516 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *p); <a name="l00517"></a>00517 <span class="comment"></span> <a name="l00518"></a>00518 <span class="comment">/**</span> <a name="l00519"></a>00519 <span class="comment"> * Move the specified file descriptor to a new pool</span> <a name="l00520"></a>00520 <span class="comment"> * @param new_file Pointer in which to return the new apr_file_t</span> <a name="l00521"></a>00521 <span class="comment"> * @param old_file The file to move</span> <a name="l00522"></a>00522 <span class="comment"> * @param p The pool to which the descriptor is to be moved</span> <a name="l00523"></a>00523 <span class="comment"> * @remark Unlike apr_file_dup2(), this function doesn't do an</span> <a name="l00524"></a>00524 <span class="comment"> * OS dup() operation on the underlying descriptor; it just</span> <a name="l00525"></a>00525 <span class="comment"> * moves the descriptor's apr_file_t wrapper to a new pool.</span> <a name="l00526"></a>00526 <span class="comment"> * @remark The new pool need not be an ancestor of old_file's pool.</span> <a name="l00527"></a>00527 <span class="comment"> * @remark After calling this function, old_file may not be used</span> <a name="l00528"></a>00528 <span class="comment"> */</span> <a name="l00529"></a>00529 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g593936bd8a0e77e6e91d13e06e45af5f">apr_file_setaside</a>(apr_file_t **new_file, <a name="l00530"></a>00530 apr_file_t *old_file, <a name="l00531"></a>00531 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *p); <a name="l00532"></a>00532 <span class="comment"></span> <a name="l00533"></a>00533 <span class="comment">/**</span> <a name="l00534"></a>00534 <span class="comment"> * Move the read/write file offset to a specified byte within a file.</span> <a name="l00535"></a>00535 <span class="comment"> * @param thefile The file descriptor</span> <a name="l00536"></a>00536 <span class="comment"> * @param where How to move the pointer, one of:</span> <a name="l00537"></a>00537 <span class="comment"> * <PRE></span> <a name="l00538"></a>00538 <span class="comment"> * APR_SET -- set the offset to offset</span> <a name="l00539"></a>00539 <span class="comment"> * APR_CUR -- add the offset to the current position </span> <a name="l00540"></a>00540 <span class="comment"> * APR_END -- add the offset to the current file size </span> <a name="l00541"></a>00541 <span class="comment"> * </PRE></span> <a name="l00542"></a>00542 <span class="comment"> * @param offset The offset to move the pointer to.</span> <a name="l00543"></a>00543 <span class="comment"> * @remark The third argument is modified to be the offset the pointer</span> <a name="l00544"></a>00544 <span class="comment"> was actually moved to.</span> <a name="l00545"></a>00545 <span class="comment"> */</span> <a name="l00546"></a>00546 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#ga4a086ea900b8f8081b567a3d098723b">apr_file_seek</a>(apr_file_t *thefile, <a name="l00547"></a>00547 apr_seek_where_t where, <a name="l00548"></a>00548 apr_off_t *offset); <a name="l00549"></a>00549 <span class="comment"></span> <a name="l00550"></a>00550 <span class="comment">/**</span> <a name="l00551"></a>00551 <span class="comment"> * Create an anonymous pipe.</span> <a name="l00552"></a>00552 <span class="comment"> * @param in The file descriptor to use as input to the pipe.</span> <a name="l00553"></a>00553 <span class="comment"> * @param out The file descriptor to use as output from the pipe.</span> <a name="l00554"></a>00554 <span class="comment"> * @param pool The pool to operate on.</span> <a name="l00555"></a>00555 <span class="comment"> */</span> <a name="l00556"></a>00556 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gdf3c35302741845a77d2e3244bff71cc">apr_file_pipe_create</a>(apr_file_t **in, <a name="l00557"></a>00557 apr_file_t **out, <a name="l00558"></a>00558 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00559"></a>00559 <span class="comment"></span> <a name="l00560"></a>00560 <span class="comment">/**</span> <a name="l00561"></a>00561 <span class="comment"> * Create a named pipe.</span> <a name="l00562"></a>00562 <span class="comment"> * @param filename The filename of the named pipe</span> <a name="l00563"></a>00563 <span class="comment"> * @param perm The permissions for the newly created pipe.</span> <a name="l00564"></a>00564 <span class="comment"> * @param pool The pool to operate on.</span> <a name="l00565"></a>00565 <span class="comment"> */</span> <a name="l00566"></a>00566 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g399d996d9d7e44aa5cc74714a6508645">apr_file_namedpipe_create</a>(const <span class="keywordtype">char</span> *filename, <a name="l00567"></a>00567 <a class="code" href="group__apr__file__info.html#g7abcb02b2c5dcf95d4f12357facd9bd2">apr_fileperms_t</a> perm, <a name="l00568"></a>00568 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00569"></a>00569 <span class="comment"></span> <a name="l00570"></a>00570 <span class="comment">/**</span> <a name="l00571"></a>00571 <span class="comment"> * Get the timeout value for a pipe or manipulate the blocking state.</span> <a name="l00572"></a>00572 <span class="comment"> * @param thepipe The pipe we are getting a timeout for.</span> <a name="l00573"></a>00573 <span class="comment"> * @param timeout The current timeout value in microseconds. </span> <a name="l00574"></a>00574 <span class="comment"> */</span> <a name="l00575"></a>00575 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g78e3a2e019477736df03f8dfadce84a9">apr_file_pipe_timeout_get</a>(apr_file_t *thepipe, <a name="l00576"></a>00576 <a class="code" href="group__apr__time.html#g4867ccc083452a265915ac7dfafde457">apr_interval_time_t</a> *timeout); <a name="l00577"></a>00577 <span class="comment"></span> <a name="l00578"></a>00578 <span class="comment">/**</span> <a name="l00579"></a>00579 <span class="comment"> * Set the timeout value for a pipe or manipulate the blocking state.</span> <a name="l00580"></a>00580 <span class="comment"> * @param thepipe The pipe we are setting a timeout on.</span> <a name="l00581"></a>00581 <span class="comment"> * @param timeout The timeout value in microseconds. Values < 0 mean wait </span> <a name="l00582"></a>00582 <span class="comment"> * forever, 0 means do not wait at all.</span> <a name="l00583"></a>00583 <span class="comment"> */</span> <a name="l00584"></a>00584 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g7c34a0fccf31ddaae121d3145a044bcf">apr_file_pipe_timeout_set</a>(apr_file_t *thepipe, <a name="l00585"></a>00585 <a class="code" href="group__apr__time.html#g4867ccc083452a265915ac7dfafde457">apr_interval_time_t</a> timeout); <a name="l00586"></a>00586 <span class="comment"></span> <a name="l00587"></a>00587 <span class="comment">/** file (un)locking functions. */</span> <a name="l00588"></a>00588 <span class="comment"></span> <a name="l00589"></a>00589 <span class="comment">/**</span> <a name="l00590"></a>00590 <span class="comment"> * Establish a lock on the specified, open file. The lock may be advisory</span> <a name="l00591"></a>00591 <span class="comment"> * or mandatory, at the discretion of the platform. The lock applies to</span> <a name="l00592"></a>00592 <span class="comment"> * the file as a whole, rather than a specific range. Locks are established</span> <a name="l00593"></a>00593 <span class="comment"> * on a per-thread/process basis; a second lock by the same thread will not</span> <a name="l00594"></a>00594 <span class="comment"> * block.</span> <a name="l00595"></a>00595 <span class="comment"> * @param thefile The file to lock.</span> <a name="l00596"></a>00596 <span class="comment"> * @param type The type of lock to establish on the file.</span> <a name="l00597"></a>00597 <span class="comment"> */</span> <a name="l00598"></a>00598 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gaa8e2e3e1cb6032bb163c3fedc1c0617">apr_file_lock</a>(apr_file_t *thefile, <span class="keywordtype">int</span> type); <a name="l00599"></a>00599 <span class="comment"></span> <a name="l00600"></a>00600 <span class="comment">/**</span> <a name="l00601"></a>00601 <span class="comment"> * Remove any outstanding locks on the file.</span> <a name="l00602"></a>00602 <span class="comment"> * @param thefile The file to unlock.</span> <a name="l00603"></a>00603 <span class="comment"> */</span> <a name="l00604"></a>00604 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gd17d8d73c82f7f9213f66b5658c45ce6">apr_file_unlock</a>(apr_file_t *thefile); <a name="l00605"></a>00605 <span class="comment"></span> <a name="l00606"></a>00606 <span class="comment">/**accessor and general file_io functions. */</span> <a name="l00607"></a>00607 <span class="comment"></span> <a name="l00608"></a>00608 <span class="comment">/**</span> <a name="l00609"></a>00609 <span class="comment"> * return the file name of the current file.</span> <a name="l00610"></a>00610 <span class="comment"> * @param new_path The path of the file. </span> <a name="l00611"></a>00611 <span class="comment"> * @param thefile The currently open file.</span> <a name="l00612"></a>00612 <span class="comment"> */</span> <a name="l00613"></a>00613 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#ga2e8a73ca212726d4970b17f5a114cd4">apr_file_name_get</a>(const <span class="keywordtype">char</span> **new_path, <a name="l00614"></a>00614 apr_file_t *thefile); <a name="l00615"></a>00615 <span class="comment"></span> <a name="l00616"></a>00616 <span class="comment">/**</span> <a name="l00617"></a>00617 <span class="comment"> * Return the data associated with the current file.</span> <a name="l00618"></a>00618 <span class="comment"> * @param data The user data associated with the file. </span> <a name="l00619"></a>00619 <span class="comment"> * @param key The key to use for retreiving data associated with this file.</span> <a name="l00620"></a>00620 <span class="comment"> * @param file The currently open file.</span> <a name="l00621"></a>00621 <span class="comment"> */</span> <a name="l00622"></a>00622 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gcd3d73d29aacad81471c52cd962e58b1">apr_file_data_get</a>(<span class="keywordtype">void</span> **data, const <span class="keywordtype">char</span> *key, <a name="l00623"></a>00623 apr_file_t *file); <a name="l00624"></a>00624 <span class="comment"></span> <a name="l00625"></a>00625 <span class="comment">/**</span> <a name="l00626"></a>00626 <span class="comment"> * Set the data associated with the current file.</span> <a name="l00627"></a>00627 <span class="comment"> * @param file The currently open file.</span> <a name="l00628"></a>00628 <span class="comment"> * @param data The user data to associate with the file. </span> <a name="l00629"></a>00629 <span class="comment"> * @param key The key to use for assocaiteing data with the file.</span> <a name="l00630"></a>00630 <span class="comment"> * @param cleanup The cleanup routine to use when the file is destroyed.</span> <a name="l00631"></a>00631 <span class="comment"> */</span> <a name="l00632"></a>00632 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#ga3efe36e5762f7aab0ece0a331cebd12">apr_file_data_set</a>(apr_file_t *file, <span class="keywordtype">void</span> *data, <a name="l00633"></a>00633 const <span class="keywordtype">char</span> *key, <a name="l00634"></a>00634 <a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a> (*cleanup)(<span class="keywordtype">void</span> *)); <a name="l00635"></a>00635 <span class="comment"></span> <a name="l00636"></a>00636 <span class="comment">/**</span> <a name="l00637"></a>00637 <span class="comment"> * Write a string to a file using a printf format.</span> <a name="l00638"></a>00638 <span class="comment"> * @param fptr The file to write to.</span> <a name="l00639"></a>00639 <span class="comment"> * @param format The format string</span> <a name="l00640"></a>00640 <span class="comment"> * @param ... The values to substitute in the format string</span> <a name="l00641"></a>00641 <span class="comment"> * @return The number of bytes written</span> <a name="l00642"></a>00642 <span class="comment"> */</span> <a name="l00643"></a>00643 <a class="code" href="group__apr__platform.html#g31d2bbbfc5a040141b43e9cd3f03a547">APR_DECLARE_NONSTD</a>(<span class="keywordtype">int</span>) <a class="code" href="group__apr__file__io.html#g6731ca713b159b22afd3d9cfa4b573ca">apr_file_printf</a>(apr_file_t *fptr, <a name="l00644"></a>00644 const <span class="keywordtype">char</span> *format, ...) <a name="l00645"></a>00645 __attribute__((format(printf,2,3))); <a name="l00646"></a>00646 <span class="comment"></span> <a name="l00647"></a>00647 <span class="comment">/**</span> <a name="l00648"></a>00648 <span class="comment"> * set the specified file's permission bits.</span> <a name="l00649"></a>00649 <span class="comment"> * @param fname The file (name) to apply the permissions to.</span> <a name="l00650"></a>00650 <span class="comment"> * @param perms The permission bits to apply to the file.</span> <a name="l00651"></a>00651 <span class="comment"> *</span> <a name="l00652"></a>00652 <span class="comment"> * @warning Some platforms may not be able to apply all of the</span> <a name="l00653"></a>00653 <span class="comment"> * available permission bits; APR_INCOMPLETE will be returned if some</span> <a name="l00654"></a>00654 <span class="comment"> * permissions are specified which could not be set.</span> <a name="l00655"></a>00655 <span class="comment"> *</span> <a name="l00656"></a>00656 <span class="comment"> * @warning Platforms which do not implement this feature will return</span> <a name="l00657"></a>00657 <span class="comment"> * APR_ENOTIMPL.</span> <a name="l00658"></a>00658 <span class="comment"> */</span> <a name="l00659"></a>00659 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g5490158b795f315a64ea9007f3ea9747">apr_file_perms_set</a>(const <span class="keywordtype">char</span> *fname, <a name="l00660"></a>00660 <a class="code" href="group__apr__file__info.html#g7abcb02b2c5dcf95d4f12357facd9bd2">apr_fileperms_t</a> perms); <a name="l00661"></a>00661 <span class="comment"></span> <a name="l00662"></a>00662 <span class="comment">/**</span> <a name="l00663"></a>00663 <span class="comment"> * Set attributes of the specified file.</span> <a name="l00664"></a>00664 <span class="comment"> * @param fname The full path to the file (using / on all systems)</span> <a name="l00665"></a>00665 <span class="comment"> * @param attributes Or'd combination of</span> <a name="l00666"></a>00666 <span class="comment"> * <PRE></span> <a name="l00667"></a>00667 <span class="comment"> * APR_FILE_ATTR_READONLY - make the file readonly</span> <a name="l00668"></a>00668 <span class="comment"> * APR_FILE_ATTR_EXECUTABLE - make the file executable</span> <a name="l00669"></a>00669 <span class="comment"> * APR_FILE_ATTR_HIDDEN - make the file hidden</span> <a name="l00670"></a>00670 <span class="comment"> * </PRE></span> <a name="l00671"></a>00671 <span class="comment"> * @param attr_mask Mask of valid bits in attributes.</span> <a name="l00672"></a>00672 <span class="comment"> * @param pool the pool to use.</span> <a name="l00673"></a>00673 <span class="comment"> * @remark This function should be used in preference to explict manipulation</span> <a name="l00674"></a>00674 <span class="comment"> * of the file permissions, because the operations to provide these</span> <a name="l00675"></a>00675 <span class="comment"> * attributes are platform specific and may involve more than simply</span> <a name="l00676"></a>00676 <span class="comment"> * setting permission bits.</span> <a name="l00677"></a>00677 <span class="comment"> * @warning Platforms which do not implement this feature will return</span> <a name="l00678"></a>00678 <span class="comment"> * APR_ENOTIMPL.</span> <a name="l00679"></a>00679 <span class="comment"> */</span> <a name="l00680"></a>00680 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g96f8bf5c147b2dffdfcda80f4e4c4c81">apr_file_attrs_set</a>(const <span class="keywordtype">char</span> *fname, <a name="l00681"></a>00681 apr_fileattrs_t attributes, <a name="l00682"></a>00682 apr_fileattrs_t attr_mask, <a name="l00683"></a>00683 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00684"></a>00684 <span class="comment"></span> <a name="l00685"></a>00685 <span class="comment">/**</span> <a name="l00686"></a>00686 <span class="comment"> * Set the mtime of the specified file.</span> <a name="l00687"></a>00687 <span class="comment"> * @param fname The full path to the file (using / on all systems)</span> <a name="l00688"></a>00688 <span class="comment"> * @param mtime The mtime to apply to the file.</span> <a name="l00689"></a>00689 <span class="comment"> * @param pool The pool to use.</span> <a name="l00690"></a>00690 <span class="comment"> * @warning Platforms which do not implement this feature will return</span> <a name="l00691"></a>00691 <span class="comment"> * APR_ENOTIMPL.</span> <a name="l00692"></a>00692 <span class="comment"> */</span> <a name="l00693"></a>00693 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gc8a2925122ac59de5b2e5816bd4f5c90">apr_file_mtime_set</a>(const <span class="keywordtype">char</span> *fname, <a name="l00694"></a>00694 <a class="code" href="group__apr__time.html#gedd0f998e5cde878c0fefa41a1ee94bd">apr_time_t</a> mtime, <a name="l00695"></a>00695 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00696"></a>00696 <span class="comment"></span> <a name="l00697"></a>00697 <span class="comment">/**</span> <a name="l00698"></a>00698 <span class="comment"> * Create a new directory on the file system.</span> <a name="l00699"></a>00699 <span class="comment"> * @param path the path for the directory to be created. (use / on all systems)</span> <a name="l00700"></a>00700 <span class="comment"> * @param perm Permissions for the new direcoty.</span> <a name="l00701"></a>00701 <span class="comment"> * @param pool the pool to use.</span> <a name="l00702"></a>00702 <span class="comment"> */</span> <a name="l00703"></a>00703 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gadf8aaff498360eb6fcf660b03dc8b1d">apr_dir_make</a>(const <span class="keywordtype">char</span> *path, <a class="code" href="group__apr__file__info.html#g7abcb02b2c5dcf95d4f12357facd9bd2">apr_fileperms_t</a> perm, <a name="l00704"></a>00704 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00705"></a>00705 <span class="comment"></span> <a name="l00706"></a>00706 <span class="comment">/** Creates a new directory on the file system, but behaves like</span> <a name="l00707"></a>00707 <span class="comment"> * 'mkdir -p'. Creates intermediate directories as required. No error</span> <a name="l00708"></a>00708 <span class="comment"> * will be reported if PATH already exists.</span> <a name="l00709"></a>00709 <span class="comment"> * @param path the path for the directory to be created. (use / on all systems)</span> <a name="l00710"></a>00710 <span class="comment"> * @param perm Permissions for the new direcoty.</span> <a name="l00711"></a>00711 <span class="comment"> * @param pool the pool to use.</span> <a name="l00712"></a>00712 <span class="comment"> */</span> <a name="l00713"></a>00713 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g33c5ab23a312cdc8b75d33dfbf6a356a">apr_dir_make_recursive</a>(const <span class="keywordtype">char</span> *path, <a name="l00714"></a>00714 <a class="code" href="group__apr__file__info.html#g7abcb02b2c5dcf95d4f12357facd9bd2">apr_fileperms_t</a> perm, <a name="l00715"></a>00715 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00716"></a>00716 <span class="comment"></span> <a name="l00717"></a>00717 <span class="comment">/**</span> <a name="l00718"></a>00718 <span class="comment"> * Remove directory from the file system.</span> <a name="l00719"></a>00719 <span class="comment"> * @param path the path for the directory to be removed. (use / on all systems)</span> <a name="l00720"></a>00720 <span class="comment"> * @param pool the pool to use.</span> <a name="l00721"></a>00721 <span class="comment"> */</span> <a name="l00722"></a>00722 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gc9d99458891b74efc267fd9e49e2bcf6">apr_dir_remove</a>(const <span class="keywordtype">char</span> *path, <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *pool); <a name="l00723"></a>00723 <span class="comment"></span> <a name="l00724"></a>00724 <span class="comment">/**</span> <a name="l00725"></a>00725 <span class="comment"> * get the specified file's stats.</span> <a name="l00726"></a>00726 <span class="comment"> * @param finfo Where to store the information about the file.</span> <a name="l00727"></a>00727 <span class="comment"> * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values </span> <a name="l00728"></a>00728 <span class="comment"> * @param thefile The file to get information about.</span> <a name="l00729"></a>00729 <span class="comment"> */</span> <a name="l00730"></a>00730 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g2d8753656fee6fe65d091e16a9ffd9fb">apr_file_info_get</a>(<a class="code" href="structapr__finfo__t.html">apr_finfo_t</a> *finfo, <a name="l00731"></a>00731 apr_int32_t wanted, <a name="l00732"></a>00732 apr_file_t *thefile); <a name="l00733"></a>00733 <a name="l00734"></a>00734 <span class="comment"></span> <a name="l00735"></a>00735 <span class="comment">/**</span> <a name="l00736"></a>00736 <span class="comment"> * Truncate the file's length to the specified offset</span> <a name="l00737"></a>00737 <span class="comment"> * @param fp The file to truncate</span> <a name="l00738"></a>00738 <span class="comment"> * @param offset The offset to truncate to.</span> <a name="l00739"></a>00739 <span class="comment"> */</span> <a name="l00740"></a>00740 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g259277b1983e816e0dfc0d5a4bbaee17">apr_file_trunc</a>(apr_file_t *fp, apr_off_t offset); <a name="l00741"></a>00741 <span class="comment"></span> <a name="l00742"></a>00742 <span class="comment">/**</span> <a name="l00743"></a>00743 <span class="comment"> * Retrieve the flags that were passed into apr_file_open()</span> <a name="l00744"></a>00744 <span class="comment"> * when the file was opened.</span> <a name="l00745"></a>00745 <span class="comment"> * @return apr_int32_t the flags</span> <a name="l00746"></a>00746 <span class="comment"> */</span> <a name="l00747"></a>00747 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(apr_int32_t) <a class="code" href="group__apr__file__io.html#g8e26799aaa878eb25f946caf6ace056b">apr_file_flags_get</a>(apr_file_t *f); <a name="l00748"></a>00748 <span class="comment"></span> <a name="l00749"></a>00749 <span class="comment">/**</span> <a name="l00750"></a>00750 <span class="comment"> * Get the pool used by the file.</span> <a name="l00751"></a>00751 <span class="comment"> */</span> <a name="l00752"></a>00752 <a class="code" href="group__apr__pools.html#g6dda96940d296b27a1bc98d9f49735e4">APR_POOL_DECLARE_ACCESSOR</a>(file); <a name="l00753"></a>00753 <span class="comment"></span> <a name="l00754"></a>00754 <span class="comment">/**</span> <a name="l00755"></a>00755 <span class="comment"> * Set a file to be inherited by child processes.</span> <a name="l00756"></a>00756 <span class="comment"> *</span> <a name="l00757"></a>00757 <span class="comment"> */</span> <a name="l00758"></a>00758 <a class="code" href="apr__inherit_8h.html#e2bb81607ba73c6731ab69050d8e1e28">APR_DECLARE_INHERIT_SET</a>(file); <a name="l00759"></a>00759 <span class="comment"></span> <a name="l00760"></a>00760 <span class="comment">/**</span> <a name="l00761"></a>00761 <span class="comment"> * Unset a file from being inherited by child processes.</span> <a name="l00762"></a>00762 <span class="comment"> */</span> <a name="l00763"></a>00763 <a class="code" href="apr__inherit_8h.html#899e9375ba3f5b0d3671a0e06268708b">APR_DECLARE_INHERIT_UNSET</a>(file); <a name="l00764"></a>00764 <span class="comment"></span> <a name="l00765"></a>00765 <span class="comment">/**</span> <a name="l00766"></a>00766 <span class="comment"> * Open a temporary file</span> <a name="l00767"></a>00767 <span class="comment"> * @param fp The apr file to use as a temporary file.</span> <a name="l00768"></a>00768 <span class="comment"> * @param templ The template to use when creating a temp file.</span> <a name="l00769"></a>00769 <span class="comment"> * @param flags The flags to open the file with. If this is zero,</span> <a name="l00770"></a>00770 <span class="comment"> * the file is opened with </span> <a name="l00771"></a>00771 <span class="comment"> * APR_CREATE | APR_READ | APR_WRITE | APR_EXCL | APR_DELONCLOSE</span> <a name="l00772"></a>00772 <span class="comment"> * @param p The pool to allocate the file out of.</span> <a name="l00773"></a>00773 <span class="comment"> * @remark </span> <a name="l00774"></a>00774 <span class="comment"> * This function generates a unique temporary file name from template. </span> <a name="l00775"></a>00775 <span class="comment"> * The last six characters of template must be XXXXXX and these are replaced </span> <a name="l00776"></a>00776 <span class="comment"> * with a string that makes the filename unique. Since it will be modified,</span> <a name="l00777"></a>00777 <span class="comment"> * template must not be a string constant, but should be declared as a character</span> <a name="l00778"></a>00778 <span class="comment"> * array. </span> <a name="l00779"></a>00779 <span class="comment"> *</span> <a name="l00780"></a>00780 <span class="comment"> */</span> <a name="l00781"></a>00781 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#g711ead7d3112a249d75eabe39e3cba95">apr_file_mktemp</a>(apr_file_t **fp, <span class="keywordtype">char</span> *templ, <a name="l00782"></a>00782 apr_int32_t flags, <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *p); <a name="l00783"></a>00783 <a name="l00784"></a>00784 <span class="comment"></span> <a name="l00785"></a>00785 <span class="comment">/**</span> <a name="l00786"></a>00786 <span class="comment"> * Find an existing directory suitable as a temporary storage location.</span> <a name="l00787"></a>00787 <span class="comment"> * @param temp_dir The temp directory.</span> <a name="l00788"></a>00788 <span class="comment"> * @param p The pool to use for any necessary allocations.</span> <a name="l00789"></a>00789 <span class="comment"> * @remark </span> <a name="l00790"></a>00790 <span class="comment"> * This function uses an algorithm to search for a directory that an</span> <a name="l00791"></a>00791 <span class="comment"> * an application can use for temporary storage. Once such a</span> <a name="l00792"></a>00792 <span class="comment"> * directory is found, that location is cached by the library. Thus,</span> <a name="l00793"></a>00793 <span class="comment"> * callers only pay the cost of this algorithm once if that one time</span> <a name="l00794"></a>00794 <span class="comment"> * is successful.</span> <a name="l00795"></a>00795 <span class="comment"> *</span> <a name="l00796"></a>00796 <span class="comment"> */</span> <a name="l00797"></a>00797 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__file__io.html#gcd6f39b856db056b528b37cceb4874ce">apr_temp_dir_get</a>(const <span class="keywordtype">char</span> **temp_dir, <a name="l00798"></a>00798 <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *p); <a name="l00799"></a>00799 <span class="comment"></span> <a name="l00800"></a>00800 <span class="comment">/** @} */</span> <a name="l00801"></a>00801 <a name="l00802"></a>00802 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00803"></a>00803 <span class="preprocessor"></span>} <a name="l00804"></a>00804 <span class="preprocessor">#endif</span> <a name="l00805"></a>00805 <span class="preprocessor"></span> <a name="l00806"></a>00806 <span class="preprocessor">#endif </span><span class="comment">/* ! APR_FILE_IO_H */</span> </pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue May 31 12:20:26 2011 for Apache Portable Runtime by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address> </body> </html>