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

📄 apr__file__io_8h-source.html

📁 apr函数库使用手册
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!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">
</head><body>
<!-- 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-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>

⌨️ 快捷键说明

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