apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject svn commit: r151768 [21/47] - in apr/site/trunk/docs/docs/apr: ./ iconv/ util/
Date Mon, 07 Feb 2005 23:12:00 GMT
Modified: apr/site/trunk/docs/docs/apr/apr__file__io_8h-source.html
URL: http://svn.apache.org/viewcvs/apr/site/trunk/docs/docs/apr/apr__file__io_8h-source.html?view=diff&r1=151767&r2=151768
==============================================================================
--- apr/site/trunk/docs/docs/apr/apr__file__io_8h-source.html (original)
+++ apr/site/trunk/docs/docs/apr/apr__file__io_8h-source.html Mon Feb  7 15:10:17 2005
@@ -3,761 +3,816 @@
 <title>Apache Portable Runtime: apr_file_io.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 </head><body>
-<!-- Generated by Doxygen 1.3.8 -->
+<!-- Generated by Doxygen 1.3.7 -->
 <div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
-<h1>apr_file_io.h</h1><a href="apr__file__io_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* Copyright 2000-2004 The Apache Software Foundation</span>
-00002 <span class="comment"> *</span>
-00003 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
-00004 <span class="comment"> * you may not use this file except in compliance with the License.</span>
-00005 <span class="comment"> * You may obtain a copy of the License at</span>
-00006 <span class="comment"> *</span>
-00007 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
-00008 <span class="comment"> *</span>
-00009 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
-00010 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
-00011 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
-00012 <span class="comment"> * See the License for the specific language governing permissions and</span>
-00013 <span class="comment"> * limitations under the License.</span>
-00014 <span class="comment"> */</span>
-00015 
-00016 <span class="preprocessor">#ifndef APR_FILE_IO_H</span>
-00017 <span class="preprocessor"></span><span class="preprocessor">#define APR_FILE_IO_H</span>
-00018 <span class="preprocessor"></span><span class="comment"></span>
-00019 <span class="comment">/**</span>
-00020 <span class="comment"> * @file apr_file_io.h</span>
-00021 <span class="comment"> * @brief APR File I/O Handling</span>
-00022 <span class="comment"> */</span>
-00023 
-00024 <span class="preprocessor">#include "apr.h"</span>
-00025 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span>
-00026 <span class="preprocessor">#include "<a class="code" href="apr__time_8h.html">apr_time.h</a>"</span>
-00027 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span>
-00028 <span class="preprocessor">#include "<a class="code" href="apr__file__info_8h.html">apr_file_info.h</a>"</span>
-00029 <span class="preprocessor">#include "<a class="code" href="apr__inherit_8h.html">apr_inherit.h</a>"</span>
-00030 
-<a name="l00031"></a><a class="code" href="apr__file__io_8h.html#a0">00031</a> <span class="preprocessor">#define APR_WANT_STDIO          </span><span class="comment">/**&lt; for SEEK_* */</span>
-<a name="l00032"></a><a class="code" href="apr__file__io_8h.html#a1">00032</a> <span class="preprocessor">#define APR_WANT_IOVEC          </span><span class="comment">/**&lt; for apr_file_writev */</span>
-00033 <span class="preprocessor">#include "<a class="code" href="apr__want_8h.html">apr_want.h</a>"</span>
-00034 
-00035 <span class="preprocessor">#ifdef __cplusplus</span>
-00036 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
-00037 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
-00038 <span class="comment"></span>
-00039 <span class="comment">/**</span>
-00040 <span class="comment"> * @defgroup apr_file_io File I/O Handling Functions</span>
-00041 <span class="comment"> * @ingroup APR </span>
-00042 <span class="comment"> * @{</span>
-00043 <span class="comment"> */</span>
-00044 <span class="comment"></span>
-00045 <span class="comment">/**</span>
-00046 <span class="comment"> * @defgroup apr_file_open_flags File Open Flags/Routines</span>
-00047 <span class="comment"> * @{</span>
-00048 <span class="comment"> */</span>
-00049 
-00050 <span class="comment">/* Note to implementors: Values in the range 0x00100000--0x80000000</span>
-00051 <span class="comment">   are reserved for platform-specific values. */</span>
-00052 
-<a name="l00053"></a><a class="code" href="group__apr__file__open__flags.html#ga0">00053</a> <span class="preprocessor">#define APR_READ       0x00001     </span><span class="comment">/**&lt; Open the file for reading */</span>
-<a name="l00054"></a><a class="code" href="group__apr__file__open__flags.html#ga1">00054</a> <span class="preprocessor">#define APR_WRITE      0x00002     </span><span class="comment">/**&lt; Open the file for writing */</span>
-<a name="l00055"></a><a class="code" href="group__apr__file__open__flags.html#ga2">00055</a> <span class="preprocessor">#define APR_CREATE     0x00004     </span><span class="comment">/**&lt; Create the file if not there */</span>
-<a name="l00056"></a><a class="code" href="group__apr__file__open__flags.html#ga3">00056</a> <span class="preprocessor">#define APR_APPEND     0x00008     </span><span class="comment">/**&lt; Append to the end of the file */</span>
-<a name="l00057"></a><a class="code" href="group__apr__file__open__flags.html#ga4">00057</a> <span class="preprocessor">#define APR_TRUNCATE   0x00010     </span><span class="comment">/**&lt; Open the file and truncate to 0 length */</span>
-<a name="l00058"></a><a class="code" href="group__apr__file__open__flags.html#ga5">00058</a> <span class="preprocessor">#define APR_BINARY     0x00020     </span><span class="comment">/**&lt; Open the file in binary mode */</span>
-<a name="l00059"></a><a class="code" href="group__apr__file__open__flags.html#ga6">00059</a> <span class="preprocessor">#define APR_EXCL       0x00040     </span><span class="comment">/**&lt; Open should fail if APR_CREATE and file</span>
-00060 <span class="comment">                                        exists. */</span>
-<a name="l00061"></a><a class="code" href="group__apr__file__open__flags.html#ga7">00061</a> <span class="preprocessor">#define APR_BUFFERED   0x00080     </span><span class="comment">/**&lt; Open the file for buffered I/O */</span>
-<a name="l00062"></a><a class="code" href="group__apr__file__open__flags.html#ga8">00062</a> <span class="preprocessor">#define APR_DELONCLOSE 0x00100     </span><span class="comment">/**&lt; Delete the file after close */</span>
-<a name="l00063"></a><a class="code" href="group__apr__file__open__flags.html#ga9">00063</a> <span class="preprocessor">#define APR_XTHREAD    0x00200     </span><span class="comment">/**&lt; Platform dependent tag to open the file</span>
-00064 <span class="comment">                                        for use across multiple threads */</span>
-<a name="l00065"></a><a class="code" href="group__apr__file__open__flags.html#ga10">00065</a> <span class="preprocessor">#define APR_SHARELOCK  0x00400     </span><span class="comment">/**&lt; Platform dependent support for higher</span>
-00066 <span class="comment">                                        level locked read/write access to support</span>
-00067 <span class="comment">                                        writes across process/machines */</span>
-<a name="l00068"></a><a class="code" href="group__apr__file__open__flags.html#ga11">00068</a> <span class="preprocessor">#define APR_FILE_NOCLEANUP 0x00800 </span><span class="comment">/**&lt; Do not register a cleanup when the file</span>
-00069 <span class="comment">                                        is opened */</span>
-<a name="l00070"></a><a class="code" href="group__apr__file__open__flags.html#ga12">00070</a> <span class="preprocessor">#define APR_SENDFILE_ENABLED 0x01000 </span><span class="comment">/**&lt; Advisory flag that this file should</span>
-00071 <span class="comment">                                          support apr_socket_sendfile operation */</span>
-<a name="l00072"></a><a class="code" href="group__apr__file__open__flags.html#ga13">00072</a> <span class="preprocessor">#define APR_LARGEFILE   0x04000    </span><span class="comment">/**&lt; Platform dependent flag to enable large file</span>
-00073 <span class="comment">                                        support; WARNING see below. */</span>
-00074 <span class="comment"></span>
-00075 <span class="comment">/** @warning The APR_LARGEFILE flag only has effect on some platforms</span>
-00076 <span class="comment"> * where sizeof(apr_off_t) == 4.  Where implemented, it allows opening</span>
-00077 <span class="comment"> * and writing to a file which exceeds the size which can be</span>
-00078 <span class="comment"> * represented by apr_off_t (2 gigabytes).  When a file's size does</span>
-00079 <span class="comment"> * exceed 2Gb, apr_file_info_get() will fail with an error on the</span>
-00080 <span class="comment"> * descriptor, likewise apr_stat()/apr_lstat() will fail on the</span>
-00081 <span class="comment"> * filename.  apr_dir_read() will fail with APR_INCOMPLETE on a</span>
-00082 <span class="comment"> * directory entry for a large file depending on the particular</span>
-00083 <span class="comment"> * APR_FINFO_* flags.  Generally, it is not recommended to use this</span>
-00084 <span class="comment"> * flag. */</span>
-00085 <span class="comment"></span>
-00086 <span class="comment">/** @} */</span>
-00087 <span class="comment"></span>
-00088 <span class="comment">/**</span>
-00089 <span class="comment"> * @defgroup apr_file_seek_flags File Seek Flags</span>
-00090 <span class="comment"> * @{</span>
-00091 <span class="comment"> */</span>
-00092 
-00093 <span class="comment">/* flags for apr_file_seek */</span><span class="comment"></span>
-00094 <span class="comment">/** Set the file position */</span>
-<a name="l00095"></a><a class="code" href="group__apr__file__seek__flags.html#ga0">00095</a> <span class="preprocessor">#define APR_SET SEEK_SET</span>
-00096 <span class="preprocessor"></span><span class="comment">/** Current */</span>
-<a name="l00097"></a><a class="code" href="group__apr__file__seek__flags.html#ga1">00097</a> <span class="preprocessor">#define APR_CUR SEEK_CUR</span>
-00098 <span class="preprocessor"></span><span class="comment">/** Go to end of file */</span>
-<a name="l00099"></a><a class="code" href="group__apr__file__seek__flags.html#ga2">00099</a> <span class="preprocessor">#define APR_END SEEK_END</span>
-00100 <span class="preprocessor"></span><span class="comment">/** @} */</span>
-00101 <span class="comment"></span>
-00102 <span class="comment">/**</span>
-00103 <span class="comment"> * @defgroup apr_file_attrs_set_flags File Attribute Flags</span>
-00104 <span class="comment"> * @{</span>
-00105 <span class="comment"> */</span>
-00106 
-00107 <span class="comment">/* flags for apr_file_attrs_set */</span>
-<a name="l00108"></a><a class="code" href="group__apr__file__attrs__set__flags.html#ga0">00108</a> <span class="preprocessor">#define APR_FILE_ATTR_READONLY   0x01          </span><span class="comment">/**&lt; File is read-only */</span>
-<a name="l00109"></a><a class="code" href="group__apr__file__attrs__set__flags.html#ga1">00109</a> <span class="preprocessor">#define APR_FILE_ATTR_EXECUTABLE 0x02          </span><span class="comment">/**&lt; File is executable */</span>
-<a name="l00110"></a><a class="code" href="group__apr__file__attrs__set__flags.html#ga2">00110</a> <span class="preprocessor">#define APR_FILE_ATTR_HIDDEN     0x04          </span><span class="comment">/**&lt; File is hidden */</span>
-00111 <span class="comment">/** @} */</span>
-00112 <span class="comment"></span>
-00113 <span class="comment">/** File attributes */</span>
-<a name="l00114"></a><a class="code" href="group__apr__file__io.html#ga0">00114</a> <span class="keyword">typedef</span> apr_uint32_t <a class="code" href="group__apr__file__io.html#ga0">apr_fileattrs_t</a>;
-00115 <span class="comment"></span>
-00116 <span class="comment">/** Type to pass as whence argument to apr_file_seek. */</span>
-<a name="l00117"></a><a class="code" href="group__apr__file__io.html#ga1">00117</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span>       <a class="code" href="group__apr__file__io.html#ga1">apr_seek_where_t</a>;
-00118 <span class="comment"></span>
-00119 <span class="comment">/**</span>
-00120 <span class="comment"> * Structure for referencing files.</span>
-00121 <span class="comment"> */</span>
-<a name="l00122"></a><a class="code" href="group__apr__file__io.html#ga2">00122</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__file__io.html#ga2">apr_file_t</a>         <a class="code" href="group__apr__file__io.html#ga2">apr_file_t</a>;
-00123 
-00124 <span class="comment">/* File lock types/flags */</span><span class="comment"></span>
-00125 <span class="comment">/**</span>
-00126 <span class="comment"> * @defgroup apr_file_lock_types File Lock Types</span>
-00127 <span class="comment"> * @{</span>
-00128 <span class="comment"> */</span>
-00129 
-<a name="l00130"></a><a class="code" href="group__apr__file__lock__types.html#ga0">00130</a> <span class="preprocessor">#define APR_FLOCK_SHARED        1       </span><span class="comment">/**&lt; Shared lock. More than one process</span>
-00131 <span class="comment">                                           or thread can hold a shared lock</span>
-00132 <span class="comment">                                           at any given time. Essentially,</span>
-00133 <span class="comment">                                           this is a "read lock", preventing</span>
-00134 <span class="comment">                                           writers from establishing an</span>
-00135 <span class="comment">                                           exclusive lock. */</span>
-<a name="l00136"></a><a class="code" href="group__apr__file__lock__types.html#ga1">00136</a> <span class="preprocessor">#define APR_FLOCK_EXCLUSIVE     2       </span><span class="comment">/**&lt; Exclusive lock. Only one process</span>
-00137 <span class="comment">                                           may hold an exclusive lock at any</span>
-00138 <span class="comment">                                           given time. This is analogous to</span>
-00139 <span class="comment">                                           a "write lock". */</span>
-00140 
-<a name="l00141"></a><a class="code" href="group__apr__file__lock__types.html#ga2">00141</a> <span class="preprocessor">#define APR_FLOCK_TYPEMASK      0x000F  </span><span class="comment">/**&lt; mask to extract lock type */</span>
-<a name="l00142"></a><a class="code" href="group__apr__file__lock__types.html#ga3">00142</a> <span class="preprocessor">#define APR_FLOCK_NONBLOCK      0x0010  </span><span class="comment">/**&lt; do not block while acquiring the</span>
-00143 <span class="comment">                                           file lock */</span>
-00144 <span class="comment">/** @} */</span>
-00145 <span class="comment"></span>
-00146 <span class="comment">/**</span>
-00147 <span class="comment"> * Open the specified file.</span>
-00148 <span class="comment"> * @param newf The opened file descriptor.</span>
-00149 <span class="comment"> * @param fname The full path to the file (using / on all systems)</span>
-00150 <span class="comment"> * @param flag Or'ed value of:</span>
-00151 <span class="comment"> * &lt;PRE&gt;</span>
-00152 <span class="comment"> *         APR_READ              open for reading</span>
-00153 <span class="comment"> *         APR_WRITE             open for writing</span>
-00154 <span class="comment"> *         APR_CREATE            create the file if not there</span>
-00155 <span class="comment"> *         APR_APPEND            file ptr is set to end prior to all writes</span>
-00156 <span class="comment"> *         APR_TRUNCATE          set length to zero if file exists</span>
-00157 <span class="comment"> *         APR_BINARY            not a text file (This flag is ignored on </span>
-00158 <span class="comment"> *                               UNIX because it has no meaning)</span>
-00159 <span class="comment"> *         APR_BUFFERED          buffer the data.  Default is non-buffered</span>
-00160 <span class="comment"> *         APR_EXCL              return error if APR_CREATE and file exists</span>
-00161 <span class="comment"> *         APR_DELONCLOSE        delete the file after closing.</span>
-00162 <span class="comment"> *         APR_XTHREAD           Platform dependent tag to open the file</span>
-00163 <span class="comment"> *                               for use across multiple threads</span>
-00164 <span class="comment"> *         APR_SHARELOCK         Platform dependent support for higher</span>
-00165 <span class="comment"> *                               level locked read/write access to support</span>
-00166 <span class="comment"> *                               writes across process/machines</span>
-00167 <span class="comment"> *         APR_FILE_NOCLEANUP    Do not register a cleanup with the pool </span>
-00168 <span class="comment"> *                               passed in on the &lt;EM&gt;pool&lt;/EM&gt; argument (see below).</span>
-00169 <span class="comment"> *                               The apr_os_file_t handle in apr_file_t will not</span>
-00170 <span class="comment"> *                               be closed when the pool is destroyed.</span>
-00171 <span class="comment"> *         APR_SENDFILE_ENABLED  Open with appropriate platform semantics</span>
-00172 <span class="comment"> *                               for sendfile operations.  Advisory only,</span>
-00173 <span class="comment"> *                               apr_socket_sendfile does not check this flag.</span>
-00174 <span class="comment"> * &lt;/PRE&gt;</span>
-00175 <span class="comment"> * @param perm Access permissions for file.</span>
-00176 <span class="comment"> * @param pool The pool to use.</span>
-00177 <span class="comment"> * @remark If perm is APR_OS_DEFAULT and the file is being created,</span>
-00178 <span class="comment"> * appropriate default permissions will be used.</span>
-00179 <span class="comment"> */</span>
-00180 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_open(apr_file_t **newf, const <span class="keywordtype">char</span> *fname,
-00181                                         apr_int32_t flag, <a class="code" href="group__apr__file__info.html#ga1">apr_fileperms_t</a> perm,
-00182                                         <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool);
-00183 <span class="comment"></span>
-00184 <span class="comment">/**</span>
-00185 <span class="comment"> * Close the specified file.</span>
-00186 <span class="comment"> * @param file The file descriptor to close.</span>
-00187 <span class="comment"> */</span>
-00188 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_close(apr_file_t *file);
-00189 <span class="comment"></span>
-00190 <span class="comment">/**</span>
-00191 <span class="comment"> * Delete the specified file.</span>
-00192 <span class="comment"> * @param path The full path to the file (using / on all systems)</span>
-00193 <span class="comment"> * @param pool The pool to use.</span>
-00194 <span class="comment"> * @remark If the file is open, it won't be removed until all</span>
-00195 <span class="comment"> * instances are closed.</span>
-00196 <span class="comment"> */</span>
-00197 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_remove(const <span class="keywordtype">char</span> *path, <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool);
-00198 <span class="comment"></span>
-00199 <span class="comment">/**</span>
-00200 <span class="comment"> * Rename the specified file.</span>
-00201 <span class="comment"> * @param from_path The full path to the original file (using / on all systems)</span>
-00202 <span class="comment"> * @param to_path The full path to the new file (using / on all systems)</span>
-00203 <span class="comment"> * @param pool The pool to use.</span>
-00204 <span class="comment"> * @warning If a file exists at the new location, then it will be</span>
-00205 <span class="comment"> * overwritten.  Moving files or directories across devices may not be</span>
-00206 <span class="comment"> * possible.</span>
-00207 <span class="comment"> */</span>
-00208 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_rename(const <span class="keywordtype">char</span> *from_path, 
-00209                                           const <span class="keywordtype">char</span> *to_path,
-00210                                           <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool);
-00211 <span class="comment"></span>
-00212 <span class="comment">/**</span>
-00213 <span class="comment"> * Copy the specified file to another file.</span>
-00214 <span class="comment"> * @param from_path The full path to the original file (using / on all systems)</span>
-00215 <span class="comment"> * @param to_path The full path to the new file (using / on all systems)</span>
-00216 <span class="comment"> * @param perms Access permissions for the new file if it is created.</span>
-00217 <span class="comment"> *     In place of the usual or'd combination of file permissions, the</span>
-00218 <span class="comment"> *     value APR_FILE_SOURCE_PERMS may be given, in which case the source</span>
-00219 <span class="comment"> *     file's permissions are copied.</span>
-00220 <span class="comment"> * @param pool The pool to use.</span>
-00221 <span class="comment"> * @remark The new file does not need to exist, it will be created if required.</span>
-00222 <span class="comment"> * @warning If the new file already exists, its contents will be overwritten.</span>
-00223 <span class="comment"> */</span>
-00224 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_copy(const <span class="keywordtype">char</span> *from_path, 
-00225                                         const <span class="keywordtype">char</span> *to_path,
-00226                                         <a class="code" href="group__apr__file__info.html#ga1">apr_fileperms_t</a> perms,
-00227                                         <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool);
-00228 <span class="comment"></span>
-00229 <span class="comment">/**</span>
-00230 <span class="comment"> * Append the specified file to another file.</span>
-00231 <span class="comment"> * @param from_path The full path to the source file (use / on all systems)</span>
-00232 <span class="comment"> * @param to_path The full path to the destination file (use / on all systems)</span>
-00233 <span class="comment"> * @param perms Access permissions for the destination file if it is created.</span>
-00234 <span class="comment"> *     In place of the usual or'd combination of file permissions, the</span>
-00235 <span class="comment"> *     value APR_FILE_SOURCE_PERMS may be given, in which case the source</span>
-00236 <span class="comment"> *     file's permissions are copied.</span>
-00237 <span class="comment"> * @param pool The pool to use.</span>
-00238 <span class="comment"> * @remark The new file does not need to exist, it will be created if required.</span>
-00239 <span class="comment"> */</span>
-00240 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_append(const <span class="keywordtype">char</span> *from_path, 
-00241                                           const <span class="keywordtype">char</span> *to_path,
-00242                                           <a class="code" href="group__apr__file__info.html#ga1">apr_fileperms_t</a> perms,
-00243                                           <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool);
-00244 <span class="comment"></span>
-00245 <span class="comment">/**</span>
-00246 <span class="comment"> * Are we at the end of the file</span>
-00247 <span class="comment"> * @param fptr The apr file we are testing.</span>
-00248 <span class="comment"> * @remark Returns APR_EOF if we are at the end of file, APR_SUCCESS otherwise.</span>
-00249 <span class="comment"> */</span>
-00250 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_eof(apr_file_t *fptr);
-00251 <span class="comment"></span>
-00252 <span class="comment">/**</span>
-00253 <span class="comment"> * Open standard error as an apr file pointer.</span>
-00254 <span class="comment"> * @param thefile The apr file to use as stderr.</span>
-00255 <span class="comment"> * @param pool The pool to allocate the file out of.</span>
-00256 <span class="comment"> * </span>
-00257 <span class="comment"> * @remark The only reason that the apr_file_open_std* functions exist</span>
-00258 <span class="comment"> * is that you may not always have a stderr/out/in on Windows.  This</span>
-00259 <span class="comment"> * is generally a problem with newer versions of Windows and services.</span>
-00260 <span class="comment"> * </span>
-00261 <span class="comment"> * @remark The other problem is that the C library functions generally work</span>
-00262 <span class="comment"> * differently on Windows and Unix.  So, by using apr_file_open_std*</span>
-00263 <span class="comment"> * functions, you can get a handle to an APR struct that works with</span>
-00264 <span class="comment"> * the APR functions which are supposed to work identically on all</span>
-00265 <span class="comment"> * platforms.</span>
-00266 <span class="comment"> */</span>
-00267 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_open_stderr(apr_file_t **thefile,
-00268                                                <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool);
-00269 <span class="comment"></span>
-00270 <span class="comment">/**</span>
-00271 <span class="comment"> * open standard output as an apr file pointer.</span>
-00272 <span class="comment"> * @param thefile The apr file to use as stdout.</span>
-00273 <span class="comment"> * @param pool The pool to allocate the file out of.</span>
-00274 <span class="comment"> * </span>
-00275 <span class="comment"> * @remark See remarks for apr_file_open_stdout.</span>
+<h1>apr_file_io.h</h1><a href="apr__file__io_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as</span>
+00002 <span class="comment"> * applicable.</span>
+00003 <span class="comment"> *</span>
+00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
+00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
+00006 <span class="comment"> * You may obtain a copy of the License at</span>
+00007 <span class="comment"> *</span>
+00008 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
+00009 <span class="comment"> *</span>
+00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
+00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
+00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
+00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
+00014 <span class="comment"> * limitations under the License.</span>
+00015 <span class="comment"> */</span>
+00016 
+00017 <span class="preprocessor">#ifndef APR_FILE_IO_H</span>
+00018 <span class="preprocessor"></span><span class="preprocessor">#define APR_FILE_IO_H</span>
+00019 <span class="preprocessor"></span><span class="comment"></span>
+00020 <span class="comment">/**</span>
+00021 <span class="comment"> * @file apr_file_io.h</span>
+00022 <span class="comment"> * @brief APR File I/O Handling</span>
+00023 <span class="comment"> */</span>
+00024 
+00025 <span class="preprocessor">#include "apr.h"</span>
+00026 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span>
+00027 <span class="preprocessor">#include "<a class="code" href="apr__time_8h.html">apr_time.h</a>"</span>
+00028 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span>
+00029 <span class="preprocessor">#include "<a class="code" href="apr__file__info_8h.html">apr_file_info.h</a>"</span>
+00030 <span class="preprocessor">#include "<a class="code" href="apr__inherit_8h.html">apr_inherit.h</a>"</span>
+00031 
+<a name="l00032"></a><a class="code" href="apr__file__io_8h.html#a0">00032</a> <span class="preprocessor">#define APR_WANT_STDIO          </span><span class="comment">/**&lt; for SEEK_* */</span>
+<a name="l00033"></a><a class="code" href="apr__file__io_8h.html#a1">00033</a> <span class="preprocessor">#define APR_WANT_IOVEC          </span><span class="comment">/**&lt; for apr_file_writev */</span>
+00034 <span class="preprocessor">#include "<a class="code" href="apr__want_8h.html">apr_want.h</a>"</span>
+00035 
+00036 <span class="preprocessor">#ifdef __cplusplus</span>
+00037 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
+00038 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
+00039 <span class="comment"></span>
+00040 <span class="comment">/**</span>
+00041 <span class="comment"> * @defgroup apr_file_io File I/O Handling Functions</span>
+00042 <span class="comment"> * @ingroup APR </span>
+00043 <span class="comment"> * @{</span>
+00044 <span class="comment"> */</span>
+00045 <span class="comment"></span>
+00046 <span class="comment">/**</span>
+00047 <span class="comment"> * @defgroup apr_file_open_flags File Open Flags/Routines</span>
+00048 <span class="comment"> * @{</span>
+00049 <span class="comment"> */</span>
+00050 
+00051 <span class="comment">/* Note to implementors: Values in the range 0x00100000--0x80000000</span>
+00052 <span class="comment">   are reserved for platform-specific values. */</span>
+00053 
+<a name="l00054"></a><a class="code" href="group__apr__file__open__flags.html#ga0">00054</a> <span class="preprocessor">#define APR_FOPEN_READ       0x00001  </span><span class="comment">/**&lt; Open the file for reading */</span>
+<a name="l00055"></a><a class="code" href="group__apr__file__open__flags.html#ga1">00055</a> <span class="preprocessor">#define APR_FOPEN_WRITE      0x00002  </span><span class="comment">/**&lt; Open the file for writing */</span>
+<a name="l00056"></a><a class="code" href="group__apr__file__open__flags.html#ga2">00056</a> <span class="preprocessor">#define APR_FOPEN_CREATE     0x00004  </span><span class="comment">/**&lt; Create the file if not there */</span>
+<a name="l00057"></a><a class="code" href="group__apr__file__open__flags.html#ga3">00057</a> <span class="preprocessor">#define APR_FOPEN_APPEND     0x00008  </span><span class="comment">/**&lt; Append to the end of the file */</span>
+<a name="l00058"></a><a class="code" href="group__apr__file__open__flags.html#ga4">00058</a> <span class="preprocessor">#define APR_FOPEN_TRUNCATE   0x00010  </span><span class="comment">/**&lt; Open the file and truncate</span>
+00059 <span class="comment">                                         to 0 length */</span>
+<a name="l00060"></a><a class="code" href="group__apr__file__open__flags.html#ga5">00060</a> <span class="preprocessor">#define APR_FOPEN_BINARY     0x00020  </span><span class="comment">/**&lt; Open the file in binary mode */</span>
+<a name="l00061"></a><a class="code" href="group__apr__file__open__flags.html#ga6">00061</a> <span class="preprocessor">#define APR_FOPEN_EXCL       0x00040  </span><span class="comment">/**&lt; Open should fail if APR_CREATE</span>
+00062 <span class="comment">                                         and file exists. */</span>
+<a name="l00063"></a><a class="code" href="group__apr__file__open__flags.html#ga7">00063</a> <span class="preprocessor">#define APR_FOPEN_BUFFERED   0x00080  </span><span class="comment">/**&lt; Open the file for buffered I/O */</span>
+<a name="l00064"></a><a class="code" href="group__apr__file__open__flags.html#ga8">00064</a> <span class="preprocessor">#define APR_FOPEN_DELONCLOSE 0x00100  </span><span class="comment">/**&lt; Delete the file after close */</span>
+<a name="l00065"></a><a class="code" href="group__apr__file__open__flags.html#ga9">00065</a> <span class="preprocessor">#define APR_FOPEN_XTHREAD    0x00200  </span><span class="comment">/**&lt; Platform dependent tag to open</span>
+00066 <span class="comment">                                         the file for use across multiple</span>
+00067 <span class="comment">                                         threads */</span>
+<a name="l00068"></a><a class="code" href="group__apr__file__open__flags.html#ga10">00068</a> <span class="preprocessor">#define APR_FOPEN_SHARELOCK  0x00400  </span><span class="comment">/**&lt; Platform dependent support for</span>
+00069 <span class="comment">                                         higher level locked read/write</span>
+00070 <span class="comment">                                         access to support writes across</span>
+00071 <span class="comment">                                         process/machines */</span>
+<a name="l00072"></a><a class="code" href="group__apr__file__open__flags.html#ga11">00072</a> <span class="preprocessor">#define APR_FOPEN_NOCLEANUP  0x00800  </span><span class="comment">/**&lt; Do not register a cleanup</span>
+00073 <span class="comment">                                         when the file is opened */</span>
+<a name="l00074"></a><a class="code" href="group__apr__file__open__flags.html#ga12">00074</a> <span class="preprocessor">#define APR_FOPEN_SENDFILE_ENABLED 0x01000 </span><span class="comment">/**&lt; Advisory flag that this</span>
+00075 <span class="comment">                                             file should support</span>
+00076 <span class="comment">                                             apr_socket_sendfile operation */</span>
+<a name="l00077"></a><a class="code" href="group__apr__file__open__flags.html#ga13">00077</a> <span class="preprocessor">#define APR_FOPEN_LARGEFILE   0x04000 </span><span class="comment">/**&lt; Platform dependent flag to enable</span>
+00078 <span class="comment">                                         large file support; WARNING see</span>
+00079 <span class="comment">                                         below. */</span>
+00080 <span class="comment">/* backcompat */</span>
+<a name="l00081"></a><a class="code" href="group__apr__file__open__flags.html#ga14">00081</a> <span class="preprocessor">#define APR_READ             APR_FOPEN_READ       </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_READ */</span>
+<a name="l00082"></a><a class="code" href="group__apr__file__open__flags.html#ga15">00082</a> <span class="preprocessor">#define APR_WRITE            APR_FOPEN_WRITE      </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_WRITE */</span>   
+<a name="l00083"></a><a class="code" href="group__apr__file__open__flags.html#ga16">00083</a> <span class="preprocessor">#define APR_CREATE           APR_FOPEN_CREATE     </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_CREATE */</span>   
+<a name="l00084"></a><a class="code" href="group__apr__file__open__flags.html#ga17">00084</a> <span class="preprocessor">#define APR_APPEND           APR_FOPEN_APPEND     </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_APPEND */</span>   
+<a name="l00085"></a><a class="code" href="group__apr__file__open__flags.html#ga18">00085</a> <span class="preprocessor">#define APR_TRUNCATE         APR_FOPEN_TRUNCATE   </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_TRUNCATE */</span>   
+<a name="l00086"></a><a class="code" href="group__apr__file__open__flags.html#ga19">00086</a> <span class="preprocessor">#define APR_BINARY           APR_FOPEN_BINARY     </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_BINARY */</span>   
+<a name="l00087"></a><a class="code" href="group__apr__file__open__flags.html#ga20">00087</a> <span class="preprocessor">#define APR_EXCL             APR_FOPEN_EXCL       </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_EXCL */</span>   
+<a name="l00088"></a><a class="code" href="group__apr__file__open__flags.html#ga21">00088</a> <span class="preprocessor">#define APR_BUFFERED         APR_FOPEN_BUFFERED   </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_BUFFERED */</span>   
+<a name="l00089"></a><a class="code" href="group__apr__file__open__flags.html#ga22">00089</a> <span class="preprocessor">#define APR_DELONCLOSE       APR_FOPEN_DELONCLOSE </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_DELONCLOSE */</span>   
+<a name="l00090"></a><a class="code" href="group__apr__file__open__flags.html#ga23">00090</a> <span class="preprocessor">#define APR_XTHREAD          APR_FOPEN_XTHREAD    </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_XTHREAD */</span>   
+<a name="l00091"></a><a class="code" href="group__apr__file__open__flags.html#ga24">00091</a> <span class="preprocessor">#define APR_SHARELOCK        APR_FOPEN_SHARELOCK  </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_SHARELOCK */</span>   
+<a name="l00092"></a><a class="code" href="group__apr__file__open__flags.html#ga25">00092</a> <span class="preprocessor">#define APR_FILE_NOCLEANUP   APR_FOPEN_NOCLEANUP  </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_NOCLEANUP */</span>   
+<a name="l00093"></a><a class="code" href="group__apr__file__open__flags.html#ga26">00093</a> <span class="preprocessor">#define APR_SENDFILE_ENABLED APR_FOPEN_SENDFILE_ENABLED </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_SENDFILE_ENABLED */</span>   
+<a name="l00094"></a><a class="code" href="group__apr__file__open__flags.html#ga27">00094</a> <span class="preprocessor">#define APR_LARGEFILE        APR_FOPEN_LARGEFILE  </span><span class="comment">/**&lt; @deprecated @see APR_FOPEN_LARGEFILE */</span>   
+00095 <span class="comment"></span>
+00096 <span class="comment">/** @warning The APR_LARGEFILE flag only has effect on some platforms</span>
+00097 <span class="comment"> * where sizeof(apr_off_t) == 4.  Where implemented, it allows opening</span>
+00098 <span class="comment"> * and writing to a file which exceeds the size which can be</span>
+00099 <span class="comment"> * represented by apr_off_t (2 gigabytes).  When a file's size does</span>
+00100 <span class="comment"> * exceed 2Gb, apr_file_info_get() will fail with an error on the</span>
+00101 <span class="comment"> * descriptor, likewise apr_stat()/apr_lstat() will fail on the</span>
+00102 <span class="comment"> * filename.  apr_dir_read() will fail with APR_INCOMPLETE on a</span>
+00103 <span class="comment"> * directory entry for a large file depending on the particular</span>
+00104 <span class="comment"> * APR_FINFO_* flags.  Generally, it is not recommended to use this</span>
+00105 <span class="comment"> * flag. */</span>
+00106 <span class="comment"></span>
+00107 <span class="comment">/** @} */</span>
+00108 <span class="comment"></span>
+00109 <span class="comment">/**</span>
+00110 <span class="comment"> * @defgroup apr_file_seek_flags File Seek Flags</span>
+00111 <span class="comment"> * @{</span>
+00112 <span class="comment"> */</span>
+00113 
+00114 <span class="comment">/* flags for apr_file_seek */</span><span class="comment"></span>
+00115 <span class="comment">/** Set the file position */</span>
+<a name="l00116"></a><a class="code" href="group__apr__file__seek__flags.html#ga0">00116</a> <span class="preprocessor">#define APR_SET SEEK_SET</span>
+00117 <span class="preprocessor"></span><span class="comment">/** Current */</span>
+<a name="l00118"></a><a class="code" href="group__apr__file__seek__flags.html#ga1">00118</a> <span class="preprocessor">#define APR_CUR SEEK_CUR</span>
+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#ga2">00120</a> <span class="preprocessor">#define APR_END SEEK_END</span>
+00121 <span class="preprocessor"></span><span class="comment">/** @} */</span>
+00122 <span class="comment"></span>
+00123 <span class="comment">/**</span>
+00124 <span class="comment"> * @defgroup apr_file_attrs_set_flags File Attribute Flags</span>
+00125 <span class="comment"> * @{</span>
+00126 <span class="comment"> */</span>
+00127 
+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#ga0">00129</a> <span class="preprocessor">#define APR_FILE_ATTR_READONLY   0x01          </span><span class="comment">/**&lt; File is read-only */</span>
+<a name="l00130"></a><a class="code" href="group__apr__file__attrs__set__flags.html#ga1">00130</a> <span class="preprocessor">#define APR_FILE_ATTR_EXECUTABLE 0x02          </span><span class="comment">/**&lt; File is executable */</span>
+<a name="l00131"></a><a class="code" href="group__apr__file__attrs__set__flags.html#ga2">00131</a> <span class="preprocessor">#define APR_FILE_ATTR_HIDDEN     0x04          </span><span class="comment">/**&lt; File is hidden */</span>
+00132 <span class="comment">/** @} */</span>
+00133 <span class="comment"></span>
+00134 <span class="comment">/**</span>
+00135 <span class="comment"> * @defgroup apr_file_writev{_full} max iovec size</span>
+00136 <span class="comment"> * @{</span>
+00137 <span class="comment"> */</span>
+00138 <span class="preprocessor">#if defined(DOXYGEN)</span>
+<a name="l00139"></a><a class="code" href="group__apr__file__writev.html#ga0">00139</a> <span class="preprocessor"></span><span class="preprocessor">#define APR_MAX_IOVEC_SIZE 1024                </span><span class="comment">/**&lt; System dependent maximum </span>
+00140 <span class="comment">                                                    size of an iovec array */</span>
+00141 <span class="preprocessor">#elif defined(IOV_MAX)</span>
+00142 <span class="preprocessor"></span><span class="preprocessor">#define APR_MAX_IOVEC_SIZE IOV_MAX</span>
+00143 <span class="preprocessor"></span><span class="preprocessor">#elif defined(MAX_IOVEC)</span>
+00144 <span class="preprocessor"></span><span class="preprocessor">#define APR_MAX_IOVEC_SIZE MAX_IOVEC</span>
+00145 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+00146 <span class="preprocessor"></span><span class="preprocessor">#define APR_MAX_IOVEC_SIZE 1024</span>
+00147 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00148 <span class="preprocessor"></span><span class="comment">/** @} */</span>
+00149 <span class="comment"></span>
+00150 <span class="comment">/** File attributes */</span>
+<a name="l00151"></a><a class="code" href="group__apr__file__io.html#ga0">00151</a> <span class="keyword">typedef</span> apr_uint32_t <a class="code" href="group__apr__file__io.html#ga0">apr_fileattrs_t</a>;
+00152 <span class="comment"></span>
+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#ga1">00154</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span>       <a class="code" href="group__apr__file__io.html#ga1">apr_seek_where_t</a>;
+00155 <span class="comment"></span>
+00156 <span class="comment">/**</span>
+00157 <span class="comment"> * Structure for referencing files.</span>
+00158 <span class="comment"> */</span>
+<a name="l00159"></a><a class="code" href="group__apr__file__io.html#ga2">00159</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__file__io.html#ga2">apr_file_t</a>         <a class="code" href="group__apr__file__io.html#ga2">apr_file_t</a>;
+00160 
+00161 <span class="comment">/* File lock types/flags */</span><span class="comment"></span>
+00162 <span class="comment">/**</span>
+00163 <span class="comment"> * @defgroup apr_file_lock_types File Lock Types</span>
+00164 <span class="comment"> * @{</span>
+00165 <span class="comment"> */</span>
+00166 
+<a name="l00167"></a><a class="code" href="group__apr__file__lock__types.html#ga0">00167</a> <span class="preprocessor">#define APR_FLOCK_SHARED        1       </span><span class="comment">/**&lt; Shared lock. More than one process</span>
+00168 <span class="comment">                                           or thread can hold a shared lock</span>
+00169 <span class="comment">                                           at any given time. Essentially,</span>
+00170 <span class="comment">                                           this is a "read lock", preventing</span>
+00171 <span class="comment">                                           writers from establishing an</span>
+00172 <span class="comment">                                           exclusive lock. */</span>
+<a name="l00173"></a><a class="code" href="group__apr__file__lock__types.html#ga1">00173</a> <span class="preprocessor">#define APR_FLOCK_EXCLUSIVE     2       </span><span class="comment">/**&lt; Exclusive lock. Only one process</span>
+00174 <span class="comment">                                           may hold an exclusive lock at any</span>
+00175 <span class="comment">                                           given time. This is analogous to</span>
+00176 <span class="comment">                                           a "write lock". */</span>
+00177 
+<a name="l00178"></a><a class="code" href="group__apr__file__lock__types.html#ga2">00178</a> <span class="preprocessor">#define APR_FLOCK_TYPEMASK      0x000F  </span><span class="comment">/**&lt; mask to extract lock type */</span>
+<a name="l00179"></a><a class="code" href="group__apr__file__lock__types.html#ga3">00179</a> <span class="preprocessor">#define APR_FLOCK_NONBLOCK      0x0010  </span><span class="comment">/**&lt; do not block while acquiring the</span>
+00180 <span class="comment">                                           file lock */</span>
+00181 <span class="comment">/** @} */</span>
+00182 <span class="comment"></span>
+00183 <span class="comment">/**</span>
+00184 <span class="comment"> * Open the specified file.</span>
+00185 <span class="comment"> * @param newf The opened file descriptor.</span>
+00186 <span class="comment"> * @param fname The full path to the file (using / on all systems)</span>
+00187 <span class="comment"> * @param flag Or'ed value of:</span>
+00188 <span class="comment"> * &lt;PRE&gt;</span>
+00189 <span class="comment"> *         APR_READ              open for reading</span>
+00190 <span class="comment"> *         APR_WRITE             open for writing</span>
+00191 <span class="comment"> *         APR_CREATE            create the file if not there</span>
+00192 <span class="comment"> *         APR_APPEND            file ptr is set to end prior to all writes</span>
+00193 <span class="comment"> *         APR_TRUNCATE          set length to zero if file exists</span>
+00194 <span class="comment"> *         APR_BINARY            not a text file (This flag is ignored on </span>
+00195 <span class="comment"> *                               UNIX because it has no meaning)</span>
+00196 <span class="comment"> *         APR_BUFFERED          buffer the data.  Default is non-buffered</span>
+00197 <span class="comment"> *         APR_EXCL              return error if APR_CREATE and file exists</span>
+00198 <span class="comment"> *         APR_DELONCLOSE        delete the file after closing.</span>
+00199 <span class="comment"> *         APR_XTHREAD           Platform dependent tag to open the file</span>
+00200 <span class="comment"> *                               for use across multiple threads</span>
+00201 <span class="comment"> *         APR_SHARELOCK         Platform dependent support for higher</span>
+00202 <span class="comment"> *                               level locked read/write access to support</span>
+00203 <span class="comment"> *                               writes across process/machines</span>
+00204 <span class="comment"> *         APR_FILE_NOCLEANUP    Do not register a cleanup with the pool </span>
+00205 <span class="comment"> *                               passed in on the &lt;EM&gt;pool&lt;/EM&gt; argument (see below).</span>
+00206 <span class="comment"> *                               The apr_os_file_t handle in apr_file_t will not</span>
+00207 <span class="comment"> *                               be closed when the pool is destroyed.</span>
+00208 <span class="comment"> *         APR_SENDFILE_ENABLED  Open with appropriate platform semantics</span>
+00209 <span class="comment"> *                               for sendfile operations.  Advisory only,</span>
+00210 <span class="comment"> *                               apr_socket_sendfile does not check this flag.</span>
+00211 <span class="comment"> * &lt;/PRE&gt;</span>
+00212 <span class="comment"> * @param perm Access permissions for file.</span>
+00213 <span class="comment"> * @param pool The pool to use.</span>
+00214 <span class="comment"> * @remark If perm is APR_OS_DEFAULT and the file is being created,</span>
+00215 <span class="comment"> * appropriate default permissions will be used.</span>
+00216 <span class="comment"> */</span>
+00217 APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **newf, const <span class="keywordtype">char</span> *fname,
+00218                                         apr_int32_t flag, apr_fileperms_t perm,
+00219                                         apr_pool_t *pool);
+00220 <span class="comment"></span>
+00221 <span class="comment">/**</span>
+00222 <span class="comment"> * Close the specified file.</span>
+00223 <span class="comment"> * @param file The file descriptor to close.</span>
+00224 <span class="comment"> */</span>
+00225 APR_DECLARE(apr_status_t) apr_file_close(apr_file_t *file);
+00226 <span class="comment"></span>
+00227 <span class="comment">/**</span>
+00228 <span class="comment"> * Delete the specified file.</span>
+00229 <span class="comment"> * @param path The full path to the file (using / on all systems)</span>
+00230 <span class="comment"> * @param pool The pool to use.</span>
+00231 <span class="comment"> * @remark If the file is open, it won't be removed until all</span>
+00232 <span class="comment"> * instances are closed.</span>
+00233 <span class="comment"> */</span>
+00234 APR_DECLARE(apr_status_t) apr_file_remove(const <span class="keywordtype">char</span> *path, apr_pool_t *pool);
+00235 <span class="comment"></span>
+00236 <span class="comment">/**</span>
+00237 <span class="comment"> * Rename the specified file.</span>
+00238 <span class="comment"> * @param from_path The full path to the original file (using / on all systems)</span>
+00239 <span class="comment"> * @param to_path The full path to the new file (using / on all systems)</span>
+00240 <span class="comment"> * @param pool The pool to use.</span>
+00241 <span class="comment"> * @warning If a file exists at the new location, then it will be</span>
+00242 <span class="comment"> * overwritten.  Moving files or directories across devices may not be</span>
+00243 <span class="comment"> * possible.</span>
+00244 <span class="comment"> */</span>
+00245 APR_DECLARE(apr_status_t) apr_file_rename(const <span class="keywordtype">char</span> *from_path, 
+00246                                           const <span class="keywordtype">char</span> *to_path,
+00247                                           apr_pool_t *pool);
+00248 <span class="comment"></span>
+00249 <span class="comment">/**</span>
+00250 <span class="comment"> * Copy the specified file to another file.</span>
+00251 <span class="comment"> * @param from_path The full path to the original file (using / on all systems)</span>
+00252 <span class="comment"> * @param to_path The full path to the new file (using / on all systems)</span>
+00253 <span class="comment"> * @param perms Access permissions for the new file if it is created.</span>
+00254 <span class="comment"> *     In place of the usual or'd combination of file permissions, the</span>
+00255 <span class="comment"> *     value APR_FILE_SOURCE_PERMS may be given, in which case the source</span>
+00256 <span class="comment"> *     file's permissions are copied.</span>
+00257 <span class="comment"> * @param pool The pool to use.</span>
+00258 <span class="comment"> * @remark The new file does not need to exist, it will be created if required.</span>
+00259 <span class="comment"> * @warning If the new file already exists, its contents will be overwritten.</span>
+00260 <span class="comment"> */</span>
+00261 APR_DECLARE(apr_status_t) apr_file_copy(const <span class="keywordtype">char</span> *from_path, 
+00262                                         const <span class="keywordtype">char</span> *to_path,
+00263                                         apr_fileperms_t perms,
+00264                                         apr_pool_t *pool);
+00265 <span class="comment"></span>
+00266 <span class="comment">/**</span>
+00267 <span class="comment"> * Append the specified file to another file.</span>
+00268 <span class="comment"> * @param from_path The full path to the source file (use / on all systems)</span>
+00269 <span class="comment"> * @param to_path The full path to the destination file (use / on all systems)</span>
+00270 <span class="comment"> * @param perms Access permissions for the destination file if it is created.</span>
+00271 <span class="comment"> *     In place of the usual or'd combination of file permissions, the</span>
+00272 <span class="comment"> *     value APR_FILE_SOURCE_PERMS may be given, in which case the source</span>
+00273 <span class="comment"> *     file's permissions are copied.</span>
+00274 <span class="comment"> * @param pool The pool to use.</span>
+00275 <span class="comment"> * @remark The new file does not need to exist, it will be created if required.</span>
 00276 <span class="comment"> */</span>
-00277 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_open_stdout(apr_file_t **thefile,
-00278                                                <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool);
-00279 <span class="comment"></span>
-00280 <span class="comment">/**</span>
-00281 <span class="comment"> * open standard input as an apr file pointer.</span>
-00282 <span class="comment"> * @param thefile The apr file to use as stdin.</span>
-00283 <span class="comment"> * @param pool The pool to allocate the file out of.</span>
-00284 <span class="comment"> * </span>
-00285 <span class="comment"> * @remark See remarks for apr_file_open_stdout.</span>
+00277 APR_DECLARE(apr_status_t) apr_file_append(const <span class="keywordtype">char</span> *from_path, 
+00278                                           const <span class="keywordtype">char</span> *to_path,
+00279                                           apr_fileperms_t perms,
+00280                                           apr_pool_t *pool);
+00281 <span class="comment"></span>
+00282 <span class="comment">/**</span>
+00283 <span class="comment"> * Are we at the end of the file</span>
+00284 <span class="comment"> * @param fptr The apr file we are testing.</span>
+00285 <span class="comment"> * @remark Returns APR_EOF if we are at the end of file, APR_SUCCESS otherwise.</span>
 00286 <span class="comment"> */</span>
-00287 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_open_stdin(apr_file_t **thefile,
-00288                                               <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool);
-00289 <span class="comment"></span>
-00290 <span class="comment">/**</span>
-00291 <span class="comment"> * Read data from the specified file.</span>
-00292 <span class="comment"> * @param thefile The file descriptor to read from.</span>
-00293 <span class="comment"> * @param buf The buffer to store the data to.</span>
-00294 <span class="comment"> * @param nbytes On entry, the number of bytes to read; on exit, the number</span>
-00295 <span class="comment"> * of bytes read.</span>
-00296 <span class="comment"> *</span>
-00297 <span class="comment"> * @remark apr_file_read will read up to the specified number of</span>
-00298 <span class="comment"> * bytes, but never more.  If there isn't enough data to fill that</span>
-00299 <span class="comment"> * number of bytes, all of the available data is read.  The third</span>
-00300 <span class="comment"> * argument is modified to reflect the number of bytes read.  If a</span>
-00301 <span class="comment"> * char was put back into the stream via ungetc, it will be the first</span>
-00302 <span class="comment"> * character returned.</span>
-00303 <span class="comment"> *</span>
-00304 <span class="comment"> * @remark It is not possible for both bytes to be read and an APR_EOF</span>
-00305 <span class="comment"> * or other error to be returned.  APR_EINTR is never returned.</span>
-00306 <span class="comment"> */</span>
-00307 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_read(apr_file_t *thefile, <span class="keywordtype">void</span> *buf,
-00308                                         apr_size_t *nbytes);
-00309 <span class="comment"></span>
-00310 <span class="comment">/**</span>
-00311 <span class="comment"> * Write data to the specified file.</span>
-00312 <span class="comment"> * @param thefile The file descriptor to write to.</span>
-00313 <span class="comment"> * @param buf The buffer which contains the data.</span>
-00314 <span class="comment"> * @param nbytes On entry, the number of bytes to write; on exit, the number </span>
-00315 <span class="comment"> *               of bytes written.</span>
-00316 <span class="comment"> *</span>
-00317 <span class="comment"> * @remark apr_file_write will write up to the specified number of</span>
-00318 <span class="comment"> * bytes, but never more.  If the OS cannot write that many bytes, it</span>
-00319 <span class="comment"> * will write as many as it can.  The third argument is modified to</span>
-00320 <span class="comment"> * reflect the * number of bytes written.</span>
-00321 <span class="comment"> *</span>
-00322 <span class="comment"> * @remark It is possible for both bytes to be written and an error to</span>
-00323 <span class="comment"> * be returned.  APR_EINTR is never returned.</span>
-00324 <span class="comment"> */</span>
-00325 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_write(apr_file_t *thefile, const <span class="keywordtype">void</span> *buf,
-00326                                          apr_size_t *nbytes);
-00327 <span class="comment"></span>
-00328 <span class="comment">/**</span>
-00329 <span class="comment"> * Write data from iovec array to the specified file.</span>
-00330 <span class="comment"> * @param thefile The file descriptor to write to.</span>
-00331 <span class="comment"> * @param vec The array from which to get the data to write to the file.</span>
-00332 <span class="comment"> * @param nvec The number of elements in the struct iovec array. This must </span>
-00333 <span class="comment"> *             be smaller than APR_MAX_IOVEC_SIZE.  If it isn't, the function </span>
-00334 <span class="comment"> *             will fail with APR_EINVAL.</span>
-00335 <span class="comment"> * @param nbytes The number of bytes written.</span>
-00336 <span class="comment"> *</span>
-00337 <span class="comment"> * @remark It is possible for both bytes to be written and an error to</span>
-00338 <span class="comment"> * be returned.  APR_EINTR is never returned.</span>
-00339 <span class="comment"> *</span>
-00340 <span class="comment"> * @remark apr_file_writev is available even if the underlying</span>
-00341 <span class="comment"> * operating system doesn't provide writev().</span>
-00342 <span class="comment"> */</span>
-00343 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_writev(apr_file_t *thefile,
-00344                                           const struct iovec *vec,
-00345                                           apr_size_t nvec, apr_size_t *nbytes);
+00287 APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr);
+00288 <span class="comment"></span>
+00289 <span class="comment">/**</span>
+00290 <span class="comment"> * Open standard error as an apr file pointer.</span>
+00291 <span class="comment"> * @param thefile The apr file to use as stderr.</span>
+00292 <span class="comment"> * @param pool The pool to allocate the file out of.</span>
+00293 <span class="comment"> * </span>
+00294 <span class="comment"> * @remark The only reason that the apr_file_open_std* functions exist</span>
+00295 <span class="comment"> * is that you may not always have a stderr/out/in on Windows.  This</span>
+00296 <span class="comment"> * is generally a problem with newer versions of Windows and services.</span>
+00297 <span class="comment"> * </span>
+00298 <span class="comment"> * @remark The other problem is that the C library functions generally work</span>
+00299 <span class="comment"> * differently on Windows and Unix.  So, by using apr_file_open_std*</span>
+00300 <span class="comment"> * functions, you can get a handle to an APR struct that works with</span>
+00301 <span class="comment"> * the APR functions which are supposed to work identically on all</span>
+00302 <span class="comment"> * platforms.</span>
+00303 <span class="comment"> */</span>
+00304 APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile,
+00305                                                apr_pool_t *pool);
+00306 <span class="comment"></span>
+00307 <span class="comment">/**</span>
+00308 <span class="comment"> * open standard output as an apr file pointer.</span>
+00309 <span class="comment"> * @param thefile The apr file to use as stdout.</span>
+00310 <span class="comment"> * @param pool The pool to allocate the file out of.</span>
+00311 <span class="comment"> * </span>
+00312 <span class="comment"> * @remark See remarks for apr_file_open_stdout.</span>
+00313 <span class="comment"> */</span>
+00314 APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile,
+00315                                                apr_pool_t *pool);
+00316 <span class="comment"></span>
+00317 <span class="comment">/**</span>
+00318 <span class="comment"> * open standard input as an apr file pointer.</span>
+00319 <span class="comment"> * @param thefile The apr file to use as stdin.</span>
+00320 <span class="comment"> * @param pool The pool to allocate the file out of.</span>
+00321 <span class="comment"> * </span>
+00322 <span class="comment"> * @remark See remarks for apr_file_open_stdout.</span>
+00323 <span class="comment"> */</span>
+00324 APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile,
+00325                                               apr_pool_t *pool);
+00326 <span class="comment"></span>
+00327 <span class="comment">/**</span>
+00328 <span class="comment"> * Read data from the specified file.</span>
+00329 <span class="comment"> * @param thefile The file descriptor to read from.</span>
+00330 <span class="comment"> * @param buf The buffer to store the data to.</span>
+00331 <span class="comment"> * @param nbytes On entry, the number of bytes to read; on exit, the number</span>
+00332 <span class="comment"> * of bytes read.</span>
+00333 <span class="comment"> *</span>
+00334 <span class="comment"> * @remark apr_file_read will read up to the specified number of</span>
+00335 <span class="comment"> * bytes, but never more.  If there isn't enough data to fill that</span>
+00336 <span class="comment"> * number of bytes, all of the available data is read.  The third</span>
+00337 <span class="comment"> * argument is modified to reflect the number of bytes read.  If a</span>
+00338 <span class="comment"> * char was put back into the stream via ungetc, it will be the first</span>
+00339 <span class="comment"> * character returned.</span>
+00340 <span class="comment"> *</span>
+00341 <span class="comment"> * @remark It is not possible for both bytes to be read and an APR_EOF</span>
+00342 <span class="comment"> * or other error to be returned.  APR_EINTR is never returned.</span>
+00343 <span class="comment"> */</span>
+00344 APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, <span class="keywordtype">void</span> *buf,
+00345                                         apr_size_t *nbytes);
 00346 <span class="comment"></span>
 00347 <span class="comment">/**</span>
-00348 <span class="comment"> * Read data from the specified file, ensuring that the buffer is filled</span>
-00349 <span class="comment"> * before returning.</span>
-00350 <span class="comment"> * @param thefile The file descriptor to read from.</span>
-00351 <span class="comment"> * @param buf The buffer to store the data to.</span>
-00352 <span class="comment"> * @param nbytes The number of bytes to read.</span>
-00353 <span class="comment"> * @param bytes_read If non-NULL, this will contain the number of bytes read.</span>
-00354 <span class="comment"> *</span>
-00355 <span class="comment"> * @remark apr_file_read will read up to the specified number of</span>
-00356 <span class="comment"> * bytes, but never more.  If there isn't enough data to fill that</span>
-00357 <span class="comment"> * number of bytes, then the process/thread will block until it is</span>
-00358 <span class="comment"> * available or EOF is reached.  If a char was put back into the</span>
-00359 <span class="comment"> * stream via ungetc, it will be the first character returned.</span>
-00360 <span class="comment"> *</span>
-00361 <span class="comment"> * @remark It is possible for both bytes to be read and an error to be</span>
-00362 <span class="comment"> * returned.  And if *bytes_read is less than nbytes, an accompanying</span>
-00363 <span class="comment"> * error is _always_ returned.</span>
-00364 <span class="comment"> *</span>
-00365 <span class="comment"> * @remark APR_EINTR is never returned.</span>
-00366 <span class="comment"> */</span>
-00367 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_read_full(apr_file_t *thefile, <span class="keywordtype">void</span> *buf,
-00368                                              apr_size_t nbytes,
-00369                                              apr_size_t *bytes_read);
-00370 <span class="comment"></span>
-00371 <span class="comment">/**</span>
-00372 <span class="comment"> * Write data to the specified file, ensuring that all of the data is</span>
-00373 <span class="comment"> * written before returning.</span>
-00374 <span class="comment"> * @param thefile The file descriptor to write to.</span>
-00375 <span class="comment"> * @param buf The buffer which contains the data.</span>
-00376 <span class="comment"> * @param nbytes The number of bytes to write.</span>
-00377 <span class="comment"> * @param bytes_written If non-NULL, set to the number of bytes written.</span>
-00378 <span class="comment"> * </span>
-00379 <span class="comment"> * @remark apr_file_write will write up to the specified number of</span>
-00380 <span class="comment"> * bytes, but never more.  If the OS cannot write that many bytes, the</span>
-00381 <span class="comment"> * process/thread will block until they can be written. Exceptional</span>
-00382 <span class="comment"> * error such as "out of space" or "pipe closed" will terminate with</span>
-00383 <span class="comment"> * an error.</span>
-00384 <span class="comment"> *</span>
-00385 <span class="comment"> * @remark It is possible for both bytes to be written and an error to</span>
-00386 <span class="comment"> * be returned.  And if *bytes_written is less than nbytes, an</span>
-00387 <span class="comment"> * accompanying error is _always_ returned.</span>
-00388 <span class="comment"> *</span>
-00389 <span class="comment"> * @remark APR_EINTR is never returned.</span>
-00390 <span class="comment"> */</span>
-00391 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_write_full(apr_file_t *thefile, 
-00392                                               const <span class="keywordtype">void</span> *buf,
-00393                                               apr_size_t nbytes, 
-00394                                               apr_size_t *bytes_written);
-00395 <span class="comment"></span>
-00396 <span class="comment">/**</span>
-00397 <span class="comment"> * Write a character into the specified file.</span>
-00398 <span class="comment"> * @param ch The character to write.</span>
-00399 <span class="comment"> * @param thefile The file descriptor to write to</span>
-00400 <span class="comment"> */</span>
-00401 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_putc(<span class="keywordtype">char</span> ch, apr_file_t *thefile);
-00402 <span class="comment"></span>
-00403 <span class="comment">/**</span>
-00404 <span class="comment"> * Read a character from the specified file.</span>
-00405 <span class="comment"> * @param ch The character to read into</span>
-00406 <span class="comment"> * @param thefile The file descriptor to read from</span>
-00407 <span class="comment"> */</span>
-00408 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_getc(<span class="keywordtype">char</span> *ch, apr_file_t *thefile);
-00409 <span class="comment"></span>
-00410 <span class="comment">/**</span>
-00411 <span class="comment"> * Put a character back onto a specified stream.</span>
-00412 <span class="comment"> * @param ch The character to write.</span>
-00413 <span class="comment"> * @param thefile The file descriptor to write to</span>
-00414 <span class="comment"> */</span>
-00415 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_ungetc(<span class="keywordtype">char</span> ch, apr_file_t *thefile);
-00416 <span class="comment"></span>
-00417 <span class="comment">/**</span>
-00418 <span class="comment"> * Read a string from the specified file.</span>
-00419 <span class="comment"> * @param str The buffer to store the string in. </span>
-00420 <span class="comment"> * @param len The length of the string</span>
-00421 <span class="comment"> * @param thefile The file descriptor to read from</span>
-00422 <span class="comment"> * @remark The buffer will be NUL-terminated if any characters are stored.</span>
-00423 <span class="comment"> */</span>
-00424 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_gets(<span class="keywordtype">char</span> *str, <span class="keywordtype">int</span> len, 
-00425                                         apr_file_t *thefile);
-00426 <span class="comment"></span>
-00427 <span class="comment">/**</span>
-00428 <span class="comment"> * Write the string into the specified file.</span>
-00429 <span class="comment"> * @param str The string to write. </span>
-00430 <span class="comment"> * @param thefile The file descriptor to write to</span>
-00431 <span class="comment"> */</span>
-00432 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_puts(const <span class="keywordtype">char</span> *str, apr_file_t *thefile);
+00348 <span class="comment"> * Write data to the specified file.</span>
+00349 <span class="comment"> * @param thefile The file descriptor to write to.</span>
+00350 <span class="comment"> * @param buf The buffer which contains the data.</span>
+00351 <span class="comment"> * @param nbytes On entry, the number of bytes to write; on exit, the number </span>
+00352 <span class="comment"> *               of bytes written.</span>
+00353 <span class="comment"> *</span>
+00354 <span class="comment"> * @remark apr_file_write will write up to the specified number of</span>
+00355 <span class="comment"> * bytes, but never more.  If the OS cannot write that many bytes, it</span>
+00356 <span class="comment"> * will write as many as it can.  The third argument is modified to</span>
+00357 <span class="comment"> * reflect the * number of bytes written.</span>
+00358 <span class="comment"> *</span>
+00359 <span class="comment"> * @remark It is possible for both bytes to be written and an error to</span>
+00360 <span class="comment"> * be returned.  APR_EINTR is never returned.</span>
+00361 <span class="comment"> */</span>
+00362 APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const <span class="keywordtype">void</span> *buf,
+00363                                          apr_size_t *nbytes);
+00364 <span class="comment"></span>
+00365 <span class="comment">/**</span>
+00366 <span class="comment"> * Write data from iovec array to the specified file.</span>
+00367 <span class="comment"> * @param thefile The file descriptor to write to.</span>
+00368 <span class="comment"> * @param vec The array from which to get the data to write to the file.</span>
+00369 <span class="comment"> * @param nvec The number of elements in the struct iovec array. This must </span>
+00370 <span class="comment"> *             be smaller than APR_MAX_IOVEC_SIZE.  If it isn't, the function </span>
+00371 <span class="comment"> *             will fail with APR_EINVAL.</span>
+00372 <span class="comment"> * @param nbytes The number of bytes written.</span>
+00373 <span class="comment"> *</span>
+00374 <span class="comment"> * @remark It is possible for both bytes to be written and an error to</span>
+00375 <span class="comment"> * be returned.  APR_EINTR is never returned.</span>
+00376 <span class="comment"> *</span>
+00377 <span class="comment"> * @remark apr_file_writev is available even if the underlying</span>
+00378 <span class="comment"> * operating system doesn't provide writev().</span>
+00379 <span class="comment"> */</span>
+00380 APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile,
+00381                                           const struct iovec *vec,
+00382                                           apr_size_t nvec, apr_size_t *nbytes);
+00383 <span class="comment"></span>
+00384 <span class="comment">/**</span>
+00385 <span class="comment"> * Read data from the specified file, ensuring that the buffer is filled</span>
+00386 <span class="comment"> * before returning.</span>
+00387 <span class="comment"> * @param thefile The file descriptor to read from.</span>
+00388 <span class="comment"> * @param buf The buffer to store the data to.</span>
+00389 <span class="comment"> * @param nbytes The number of bytes to read.</span>
+00390 <span class="comment"> * @param bytes_read If non-NULL, this will contain the number of bytes read.</span>
+00391 <span class="comment"> *</span>
+00392 <span class="comment"> * @remark apr_file_read will read up to the specified number of</span>
+00393 <span class="comment"> * bytes, but never more.  If there isn't enough data to fill that</span>
+00394 <span class="comment"> * number of bytes, then the process/thread will block until it is</span>
+00395 <span class="comment"> * available or EOF is reached.  If a char was put back into the</span>
+00396 <span class="comment"> * stream via ungetc, it will be the first character returned.</span>
+00397 <span class="comment"> *</span>
+00398 <span class="comment"> * @remark It is possible for both bytes to be read and an error to be</span>
+00399 <span class="comment"> * returned.  And if *bytes_read is less than nbytes, an accompanying</span>
+00400 <span class="comment"> * error is _always_ returned.</span>
+00401 <span class="comment"> *</span>
+00402 <span class="comment"> * @remark APR_EINTR is never returned.</span>
+00403 <span class="comment"> */</span>
+00404 APR_DECLARE(apr_status_t) apr_file_read_full(apr_file_t *thefile, <span class="keywordtype">void</span> *buf,
+00405                                              apr_size_t nbytes,
+00406                                              apr_size_t *bytes_read);
+00407 <span class="comment"></span>
+00408 <span class="comment">/**</span>
+00409 <span class="comment"> * Write data to the specified file, ensuring that all of the data is</span>
+00410 <span class="comment"> * written before returning.</span>
+00411 <span class="comment"> * @param thefile The file descriptor to write to.</span>
+00412 <span class="comment"> * @param buf The buffer which contains the data.</span>
+00413 <span class="comment"> * @param nbytes The number of bytes to write.</span>
+00414 <span class="comment"> * @param bytes_written If non-NULL, set to the number of bytes written.</span>
+00415 <span class="comment"> * </span>
+00416 <span class="comment"> * @remark apr_file_write will write up to the specified number of</span>
+00417 <span class="comment"> * bytes, but never more.  If the OS cannot write that many bytes, the</span>
+00418 <span class="comment"> * process/thread will block until they can be written. Exceptional</span>
+00419 <span class="comment"> * error such as "out of space" or "pipe closed" will terminate with</span>
+00420 <span class="comment"> * an error.</span>
+00421 <span class="comment"> *</span>
+00422 <span class="comment"> * @remark It is possible for both bytes to be written and an error to</span>
+00423 <span class="comment"> * be returned.  And if *bytes_written is less than nbytes, an</span>
+00424 <span class="comment"> * accompanying error is _always_ returned.</span>
+00425 <span class="comment"> *</span>
+00426 <span class="comment"> * @remark APR_EINTR is never returned.</span>
+00427 <span class="comment"> */</span>
+00428 APR_DECLARE(apr_status_t) apr_file_write_full(apr_file_t *thefile, 
+00429                                               const <span class="keywordtype">void</span> *buf,
+00430                                               apr_size_t nbytes, 
+00431                                               apr_size_t *bytes_written);
+00432 
 00433 <span class="comment"></span>
 00434 <span class="comment">/**</span>
-00435 <span class="comment"> * Flush the file's buffer.</span>
-00436 <span class="comment"> * @param thefile The file descriptor to flush</span>
-00437 <span class="comment"> */</span>
-00438 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_flush(apr_file_t *thefile);
-00439 <span class="comment"></span>
-00440 <span class="comment">/**</span>
-00441 <span class="comment"> * Duplicate the specified file descriptor.</span>
-00442 <span class="comment"> * @param new_file The structure to duplicate into. </span>
-00443 <span class="comment"> * @param old_file The file to duplicate.</span>
-00444 <span class="comment"> * @param p The pool to use for the new file.</span>
-00445 <span class="comment"> * @remark *new_file must point to a valid apr_file_t, or point to NULL.</span>
-00446 <span class="comment"> */</span>         
-00447 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_dup(apr_file_t **new_file,
-00448                                        apr_file_t *old_file,
-00449                                        <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *p);
-00450 <span class="comment"></span>
+00435 <span class="comment"> * Write data from iovec array to the specified file, ensuring that all of the</span>
+00436 <span class="comment"> * data is written before returning.</span>
+00437 <span class="comment"> * @param thefile The file descriptor to write to.</span>
+00438 <span class="comment"> * @param vec The array from which to get the data to write to the file.</span>
+00439 <span class="comment"> * @param nvec The number of elements in the struct iovec array. This must </span>
+00440 <span class="comment"> *             be smaller than APR_MAX_IOVEC_SIZE.  If it isn't, the function </span>
+00441 <span class="comment"> *             will fail with APR_EINVAL.</span>
+00442 <span class="comment"> * @param nbytes The number of bytes written.</span>
+00443 <span class="comment"> *</span>
+00444 <span class="comment"> * @remark apr_file_writev_full is available even if the underlying</span>
+00445 <span class="comment"> * operating system doesn't provide writev().</span>
+00446 <span class="comment"> */</span>
+00447 APR_DECLARE(apr_status_t) apr_file_writev_full(apr_file_t *thefile,
+00448                                                const struct iovec *vec,
+00449                                                apr_size_t nvec,
+00450                                                apr_size_t *nbytes);<span class="comment"></span>
 00451 <span class="comment">/**</span>
-00452 <span class="comment"> * Duplicate the specified file descriptor and close the original</span>
-00453 <span class="comment"> * @param new_file The old file that is to be closed and reused</span>
-00454 <span class="comment"> * @param old_file The file to duplicate</span>
-00455 <span class="comment"> * @param p        The pool to use for the new file</span>
-00456 <span class="comment"> *</span>
-00457 <span class="comment"> * @remark new_file MUST point at a valid apr_file_t. It cannot be NULL.</span>
-00458 <span class="comment"> */</span>
-00459 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_dup2(apr_file_t *new_file,
-00460                                         apr_file_t *old_file,
-00461                                         <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *p);
-00462 <span class="comment"></span>
-00463 <span class="comment">/**</span>
-00464 <span class="comment"> * Move the specified file descriptor to a new pool</span>
-00465 <span class="comment"> * @param new_file Pointer in which to return the new apr_file_t</span>
-00466 <span class="comment"> * @param old_file The file to move</span>
-00467 <span class="comment"> * @param p        The pool to which the descriptor is to be moved</span>
-00468 <span class="comment"> * @remark Unlike apr_file_dup2(), this function doesn't do an</span>
-00469 <span class="comment"> *         OS dup() operation on the underlying descriptor; it just</span>
-00470 <span class="comment"> *         moves the descriptor's apr_file_t wrapper to a new pool.</span>
-00471 <span class="comment"> * @remark The new pool need not be an ancestor of old_file's pool.</span>
-00472 <span class="comment"> * @remark After calling this function, old_file may not be used</span>
-00473 <span class="comment"> */</span>
-00474 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_setaside(apr_file_t **new_file,
-00475                                             apr_file_t *old_file,
-00476                                             <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *p);
-00477 <span class="comment"></span>
-00478 <span class="comment">/**</span>
-00479 <span class="comment"> * Move the read/write file offset to a specified byte within a file.</span>
-00480 <span class="comment"> * @param thefile The file descriptor</span>
-00481 <span class="comment"> * @param where How to move the pointer, one of:</span>
-00482 <span class="comment"> * &lt;PRE&gt;</span>
-00483 <span class="comment"> *            APR_SET  --  set the offset to offset</span>
-00484 <span class="comment"> *            APR_CUR  --  add the offset to the current position </span>
-00485 <span class="comment"> *            APR_END  --  add the offset to the current file size </span>
-00486 <span class="comment"> * &lt;/PRE&gt;</span>
-00487 <span class="comment"> * @param offset The offset to move the pointer to.</span>
-00488 <span class="comment"> * @remark The third argument is modified to be the offset the pointer</span>
-00489 <span class="comment">          was actually moved to.</span>
-00490 <span class="comment"> */</span>
-00491 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_seek(apr_file_t *thefile, 
-00492                                    apr_seek_where_t where,
-00493                                    apr_off_t *offset);
+00452 <span class="comment"> * Write a character into the specified file.</span>
+00453 <span class="comment"> * @param ch The character to write.</span>
+00454 <span class="comment"> * @param thefile The file descriptor to write to</span>
+00455 <span class="comment"> */</span>
+00456 APR_DECLARE(apr_status_t) apr_file_putc(<span class="keywordtype">char</span> ch, apr_file_t *thefile);
+00457 <span class="comment"></span>
+00458 <span class="comment">/**</span>
+00459 <span class="comment"> * Read a character from the specified file.</span>
+00460 <span class="comment"> * @param ch The character to read into</span>
+00461 <span class="comment"> * @param thefile The file descriptor to read from</span>
+00462 <span class="comment"> */</span>
+00463 APR_DECLARE(apr_status_t) apr_file_getc(<span class="keywordtype">char</span> *ch, apr_file_t *thefile);
+00464 <span class="comment"></span>
+00465 <span class="comment">/**</span>
+00466 <span class="comment"> * Put a character back onto a specified stream.</span>
+00467 <span class="comment"> * @param ch The character to write.</span>
+00468 <span class="comment"> * @param thefile The file descriptor to write to</span>
+00469 <span class="comment"> */</span>
+00470 APR_DECLARE(apr_status_t) apr_file_ungetc(<span class="keywordtype">char</span> ch, apr_file_t *thefile);
+00471 <span class="comment"></span>
+00472 <span class="comment">/**</span>
+00473 <span class="comment"> * Read a string from the specified file.</span>
+00474 <span class="comment"> * @param str The buffer to store the string in. </span>
+00475 <span class="comment"> * @param len The length of the string</span>
+00476 <span class="comment"> * @param thefile The file descriptor to read from</span>
+00477 <span class="comment"> * @remark The buffer will be NUL-terminated if any characters are stored.</span>
+00478 <span class="comment"> */</span>
+00479 APR_DECLARE(apr_status_t) apr_file_gets(<span class="keywordtype">char</span> *str, <span class="keywordtype">int</span> len, 
+00480                                         apr_file_t *thefile);
+00481 <span class="comment"></span>
+00482 <span class="comment">/**</span>
+00483 <span class="comment"> * Write the string into the specified file.</span>
+00484 <span class="comment"> * @param str The string to write. </span>
+00485 <span class="comment"> * @param thefile The file descriptor to write to</span>
+00486 <span class="comment"> */</span>
+00487 APR_DECLARE(apr_status_t) apr_file_puts(const <span class="keywordtype">char</span> *str, apr_file_t *thefile);
+00488 <span class="comment"></span>
+00489 <span class="comment">/**</span>
+00490 <span class="comment"> * Flush the file's buffer.</span>
+00491 <span class="comment"> * @param thefile The file descriptor to flush</span>
+00492 <span class="comment"> */</span>
+00493 APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile);
 00494 <span class="comment"></span>
 00495 <span class="comment">/**</span>
-00496 <span class="comment"> * Create an anonymous pipe.</span>
-00497 <span class="comment"> * @param in The file descriptor to use as input to the pipe.</span>
-00498 <span class="comment"> * @param out The file descriptor to use as output from the pipe.</span>
-00499 <span class="comment"> * @param pool The pool to operate on.</span>
-00500 <span class="comment"> */</span>
-00501 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_file_pipe_create(apr_file_t **in, 
-00502                                                apr_file_t **out,
-00503                                                <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool);
-00504 <span class="comment"></span>
-00505 <span class="comment">/**</span>
-00506 <span class="comment"> * Create a named pipe.</span>
-00507 <span class="comment"> * @param filename The filename of the named pipe</span>
-00508 <span class="comment"> * @param perm The permissions for the newly created pipe.</span>
-00509 <span class="comment"> * @param pool The pool to operate on.</span>
-00510 <span class="comment"> */</span>

[... 554 lines stripped ...]


Mime
View raw message