Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > by-pkgid > 4f37b923758ceff94a2c0ccca62b4b43 > files > 67

libapr1-devel-1.1.1-1mdk.i586.rpm

<!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_info.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.9.1 -->
<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>
<div class="nav">
<a class="el" href="dir_000000.html">home</a>&nbsp;/&nbsp;<a class="el" href="dir_000001.html">oden</a>&nbsp;/&nbsp;<a class="el" href="dir_000002.html">RPM</a>&nbsp;/&nbsp;<a class="el" href="dir_000003.html">BUILD</a>&nbsp;/&nbsp;<a class="el" href="dir_000004.html">apr-1.1.1</a>&nbsp;/&nbsp;<a class="el" href="dir_000005.html">include</a></div>
<h1>apr_file_info.h</h1><a href="apr__file__info_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">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_INFO_H</span>
00017 <span class="preprocessor"></span><span class="preprocessor">#define APR_FILE_INFO_H</span>
00018 <span class="preprocessor"></span><span class="comment"></span>
00019 <span class="comment">/**</span>
00020 <span class="comment"> * @file apr_file_info.h</span>
00021 <span class="comment"> * @brief APR File Information</span>
00022 <span class="comment"> */</span>
00023 
00024 <span class="preprocessor">#include "<a class="code" href="apr_8h.html">apr.h</a>"</span>
00025 <span class="preprocessor">#include "<a class="code" href="apr__user_8h.html">apr_user.h</a>"</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__tables_8h.html">apr_tables.h</a>"</span>
00028 <span class="preprocessor">#include "<a class="code" href="apr__time_8h.html">apr_time.h</a>"</span>
00029 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span>
00030 
00031 <span class="preprocessor">#if APR_HAVE_SYS_UIO_H</span>
00032 <span class="preprocessor"></span><span class="preprocessor">#include &lt;sys/uio.h&gt;</span>
00033 <span class="preprocessor">#endif</span>
00034 <span class="preprocessor"></span>
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_info File Information</span>
00041 <span class="comment"> * @ingroup APR </span>
00042 <span class="comment"> * @{</span>
00043 <span class="comment"> */</span>
00044 
00045 <span class="comment">/* Many applications use the type member to determine the</span>
00046 <span class="comment"> * existance of a file or initialization of the file info,</span>
00047 <span class="comment"> * so the APR_NOFILE value must be distinct from APR_UNKFILE.</span>
00048 <span class="comment"> */</span>
00049 <span class="comment"></span>
00050 <span class="comment">/** apr_filetype_e values for the filetype member of the </span>
00051 <span class="comment"> * apr_file_info_t structure</span>
00052 <span class="comment"> * @warning: Not all of the filetypes below can be determined.</span>
00053 <span class="comment"> * For example, a given platform might not correctly report </span>
00054 <span class="comment"> * a socket descriptor as APR_SOCK if that type isn't </span>
00055 <span class="comment"> * well-identified on that platform.  In such cases where</span>
00056 <span class="comment"> * a filetype exists but cannot be described by the recognized</span>
00057 <span class="comment"> * flags below, the filetype will be APR_UNKFILE.  If the</span>
00058 <span class="comment"> * filetype member is not determined, the type will be APR_NOFILE.</span>
00059 <span class="comment"> */</span>
00060 
<a name="l00061"></a><a class="code" href="group__apr__file__info.html#ga4">00061</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
00062     <a class="code" href="group__apr__file__info.html#gga4a66">APR_NOFILE</a> = 0,     <span class="comment">/**&lt; no file type determined */</span>
00063     APR_REG,            <span class="comment">/**&lt; a regular file */</span>
00064     APR_DIR,            <span class="comment">/**&lt; a directory */</span>
00065     APR_CHR,            <span class="comment">/**&lt; a character device */</span>
00066     APR_BLK,            <span class="comment">/**&lt; a block device */</span>
00067     APR_PIPE,           <span class="comment">/**&lt; a FIFO / pipe */</span>
00068     APR_LNK,            <span class="comment">/**&lt; a symbolic link */</span>
00069     APR_SOCK,           <span class="comment">/**&lt; a [unix domain] socket */</span>
00070     <a class="code" href="group__apr__file__info.html#gga4a74">APR_UNKFILE</a> = 127   <span class="comment">/**&lt; a file of some other unknown type */</span>
00071 } apr_filetype_e; 
00072 <span class="comment"></span>
00073 <span class="comment">/**</span>
00074 <span class="comment"> * @defgroup apr_file_permissions File Permissions flags </span>
00075 <span class="comment"> * @{</span>
00076 <span class="comment"> */</span>
00077 
<a name="l00078"></a><a class="code" href="group__apr__file__permissions.html#ga0">00078</a> <span class="preprocessor">#define APR_FPROT_USETID      0x8000 </span><span class="comment">/**&lt; Set user id */</span>
<a name="l00079"></a><a class="code" href="group__apr__file__permissions.html#ga1">00079</a> <span class="preprocessor">#define APR_FPROT_UREAD       0x0400 </span><span class="comment">/**&lt; Read by user */</span>
<a name="l00080"></a><a class="code" href="group__apr__file__permissions.html#ga2">00080</a> <span class="preprocessor">#define APR_FPROT_UWRITE      0x0200 </span><span class="comment">/**&lt; Write by user */</span>
<a name="l00081"></a><a class="code" href="group__apr__file__permissions.html#ga3">00081</a> <span class="preprocessor">#define APR_FPROT_UEXECUTE    0x0100 </span><span class="comment">/**&lt; Execute by user */</span>
00082 
<a name="l00083"></a><a class="code" href="group__apr__file__permissions.html#ga4">00083</a> <span class="preprocessor">#define APR_FPROT_GSETID      0x4000 </span><span class="comment">/**&lt; Set group id */</span>
<a name="l00084"></a><a class="code" href="group__apr__file__permissions.html#ga5">00084</a> <span class="preprocessor">#define APR_FPROT_GREAD       0x0040 </span><span class="comment">/**&lt; Read by group */</span>
<a name="l00085"></a><a class="code" href="group__apr__file__permissions.html#ga6">00085</a> <span class="preprocessor">#define APR_FPROT_GWRITE      0x0020 </span><span class="comment">/**&lt; Write by group */</span>
<a name="l00086"></a><a class="code" href="group__apr__file__permissions.html#ga7">00086</a> <span class="preprocessor">#define APR_FPROT_GEXECUTE    0x0010 </span><span class="comment">/**&lt; Execute by group */</span>
00087 
<a name="l00088"></a><a class="code" href="group__apr__file__permissions.html#ga8">00088</a> <span class="preprocessor">#define APR_FPROT_WSTICKY     0x2000 </span><span class="comment">/**&lt; Sticky bit */</span>
<a name="l00089"></a><a class="code" href="group__apr__file__permissions.html#ga9">00089</a> <span class="preprocessor">#define APR_FPROT_WREAD       0x0004 </span><span class="comment">/**&lt; Read by others */</span>
<a name="l00090"></a><a class="code" href="group__apr__file__permissions.html#ga10">00090</a> <span class="preprocessor">#define APR_FPROT_WWRITE      0x0002 </span><span class="comment">/**&lt; Write by others */</span>
<a name="l00091"></a><a class="code" href="group__apr__file__permissions.html#ga11">00091</a> <span class="preprocessor">#define APR_FPROT_WEXECUTE    0x0001 </span><span class="comment">/**&lt; Execute by others */</span>
00092 
<a name="l00093"></a><a class="code" href="group__apr__file__permissions.html#ga12">00093</a> <span class="preprocessor">#define APR_FPROT_OS_DEFAULT  0x0FFF </span><span class="comment">/**&lt; use OS's default permissions */</span>
00094 
00095 <span class="comment">/* additional permission flags for apr_file_copy  and apr_file_append */</span>
<a name="l00096"></a><a class="code" href="group__apr__file__permissions.html#ga13">00096</a> <span class="preprocessor">#define APR_FPROT_FILE_SOURCE_PERMS 0x1000 </span><span class="comment">/**&lt; Copy source file's permissions */</span>
00097     
00098 <span class="comment">/* backcompat */</span>
<a name="l00099"></a><a class="code" href="group__apr__file__permissions.html#ga14">00099</a> <span class="preprocessor">#define APR_USETID     APR_FPROT_USETID     </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_USETID     */</span>
<a name="l00100"></a><a class="code" href="group__apr__file__permissions.html#ga15">00100</a> <span class="preprocessor">#define APR_UREAD      APR_FPROT_UREAD      </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_UREAD      */</span>
<a name="l00101"></a><a class="code" href="group__apr__file__permissions.html#ga16">00101</a> <span class="preprocessor">#define APR_UWRITE     APR_FPROT_UWRITE     </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_UWRITE     */</span>
<a name="l00102"></a><a class="code" href="group__apr__file__permissions.html#ga17">00102</a> <span class="preprocessor">#define APR_UEXECUTE   APR_FPROT_UEXECUTE   </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_UEXECUTE   */</span>
<a name="l00103"></a><a class="code" href="group__apr__file__permissions.html#ga18">00103</a> <span class="preprocessor">#define APR_GSETID     APR_FPROT_GSETID     </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_GSETID     */</span>
<a name="l00104"></a><a class="code" href="group__apr__file__permissions.html#ga19">00104</a> <span class="preprocessor">#define APR_GREAD      APR_FPROT_GREAD      </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_GREAD      */</span>
<a name="l00105"></a><a class="code" href="group__apr__file__permissions.html#ga20">00105</a> <span class="preprocessor">#define APR_GWRITE     APR_FPROT_GWRITE     </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_GWRITE     */</span>
<a name="l00106"></a><a class="code" href="group__apr__file__permissions.html#ga21">00106</a> <span class="preprocessor">#define APR_GEXECUTE   APR_FPROT_GEXECUTE   </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_GEXECUTE   */</span>
<a name="l00107"></a><a class="code" href="group__apr__file__permissions.html#ga22">00107</a> <span class="preprocessor">#define APR_WSTICKY    APR_FPROT_WSTICKY    </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_WSTICKY    */</span>
<a name="l00108"></a><a class="code" href="group__apr__file__permissions.html#ga23">00108</a> <span class="preprocessor">#define APR_WREAD      APR_FPROT_WREAD      </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_WREAD      */</span>
<a name="l00109"></a><a class="code" href="group__apr__file__permissions.html#ga24">00109</a> <span class="preprocessor">#define APR_WWRITE     APR_FPROT_WWRITE     </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_WWRITE     */</span>
<a name="l00110"></a><a class="code" href="group__apr__file__permissions.html#ga25">00110</a> <span class="preprocessor">#define APR_WEXECUTE   APR_FPROT_WEXECUTE   </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_WEXECUTE   */</span>
<a name="l00111"></a><a class="code" href="group__apr__file__permissions.html#ga26">00111</a> <span class="preprocessor">#define APR_OS_DEFAULT APR_FPROT_OS_DEFAULT </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_OS_DEFAULT */</span>
<a name="l00112"></a><a class="code" href="group__apr__file__permissions.html#ga27">00112</a> <span class="preprocessor">#define APR_FILE_SOURCE_PERMS APR_FPROT_FILE_SOURCE_PERMS </span><span class="comment">/**&lt; @deprecated @see APR_FPROT_FILE_SOURCE_PERMS */</span>
00113     <span class="comment"></span>
00114 <span class="comment">/** @} */</span>
00115 
00116 <span class="comment"></span>
00117 <span class="comment">/**</span>
00118 <span class="comment"> * Structure for referencing directories.</span>
00119 <span class="comment"> */</span>
<a name="l00120"></a><a class="code" href="group__apr__file__info.html#ga0">00120</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__file__info.html#ga0">apr_dir_t</a>          <a class="code" href="group__apr__file__info.html#ga0">apr_dir_t</a>;<span class="comment"></span>
00121 <span class="comment">/**</span>
00122 <span class="comment"> * Structure for determining file permissions.</span>
00123 <span class="comment"> */</span>
<a name="l00124"></a><a class="code" href="group__apr__file__info.html#ga1">00124</a> <span class="keyword">typedef</span> apr_int32_t               apr_fileperms_t;
00125 <span class="preprocessor">#if (defined WIN32) || (defined NETWARE)</span>
00126 <span class="preprocessor"></span><span class="comment">/**</span>
00127 <span class="comment"> * Structure for determining the inode of the file.</span>
00128 <span class="comment"> */</span>
00129 <span class="keyword">typedef</span> apr_uint64_t              apr_ino_t;<span class="comment"></span>
00130 <span class="comment">/**</span>
00131 <span class="comment"> * Structure for determining the device the file is on.</span>
00132 <span class="comment"> */</span>
00133 <span class="keyword">typedef</span> apr_uint32_t              apr_dev_t;
00134 <span class="preprocessor">#else</span>
00135 <span class="preprocessor"></span><span class="comment">/** The inode of the file. */</span>
<a name="l00136"></a><a class="code" href="group__apr__file__info.html#ga2">00136</a> <span class="keyword">typedef</span> ino_t                     apr_ino_t;<span class="comment"></span>
00137 <span class="comment">/**</span>
00138 <span class="comment"> * Structure for determining the device the file is on.</span>
00139 <span class="comment"> */</span>
<a name="l00140"></a><a class="code" href="group__apr__file__info.html#ga3">00140</a> <span class="keyword">typedef</span> dev_t                     apr_dev_t;
00141 <span class="preprocessor">#endif</span>
00142 <span class="preprocessor"></span><span class="comment"></span>
00143 <span class="comment">/**</span>
00144 <span class="comment"> * @defgroup apr_file_stat Stat Functions</span>
00145 <span class="comment"> * @{</span>
00146 <span class="comment"> */</span><span class="comment"></span>
00147 <span class="comment">/** file info structure */</span>
<a name="l00148"></a><a class="code" href="group__apr__file__stat.html#ga0">00148</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapr__finfo__t.html">apr_finfo_t</a>        <a class="code" href="group__apr__file__stat.html#ga0">apr_finfo_t</a>;
00149 
<a name="l00150"></a><a class="code" href="group__apr__file__stat.html#ga2">00150</a> <span class="preprocessor">#define APR_FINFO_LINK   0x00000001 </span><span class="comment">/**&lt; Stat the link not the file itself if it is a link */</span>
<a name="l00151"></a><a class="code" href="group__apr__file__stat.html#ga3">00151</a> <span class="preprocessor">#define APR_FINFO_MTIME  0x00000010 </span><span class="comment">/**&lt; Modification Time */</span>
<a name="l00152"></a><a class="code" href="group__apr__file__stat.html#ga4">00152</a> <span class="preprocessor">#define APR_FINFO_CTIME  0x00000020 </span><span class="comment">/**&lt; Creation or inode-changed time */</span>
<a name="l00153"></a><a class="code" href="group__apr__file__stat.html#ga5">00153</a> <span class="preprocessor">#define APR_FINFO_ATIME  0x00000040 </span><span class="comment">/**&lt; Access Time */</span>
<a name="l00154"></a><a class="code" href="group__apr__file__stat.html#ga6">00154</a> <span class="preprocessor">#define APR_FINFO_SIZE   0x00000100 </span><span class="comment">/**&lt; Size of the file */</span>
<a name="l00155"></a><a class="code" href="group__apr__file__stat.html#ga7">00155</a> <span class="preprocessor">#define APR_FINFO_CSIZE  0x00000200 </span><span class="comment">/**&lt; Storage size consumed by the file */</span>
<a name="l00156"></a><a class="code" href="group__apr__file__stat.html#ga8">00156</a> <span class="preprocessor">#define APR_FINFO_DEV    0x00001000 </span><span class="comment">/**&lt; Device */</span>
<a name="l00157"></a><a class="code" href="group__apr__file__stat.html#ga9">00157</a> <span class="preprocessor">#define APR_FINFO_INODE  0x00002000 </span><span class="comment">/**&lt; Inode */</span>
<a name="l00158"></a><a class="code" href="group__apr__file__stat.html#ga10">00158</a> <span class="preprocessor">#define APR_FINFO_NLINK  0x00004000 </span><span class="comment">/**&lt; Number of links */</span>
<a name="l00159"></a><a class="code" href="group__apr__file__stat.html#ga11">00159</a> <span class="preprocessor">#define APR_FINFO_TYPE   0x00008000 </span><span class="comment">/**&lt; Type */</span>
<a name="l00160"></a><a class="code" href="group__apr__file__stat.html#ga12">00160</a> <span class="preprocessor">#define APR_FINFO_USER   0x00010000 </span><span class="comment">/**&lt; User */</span>
<a name="l00161"></a><a class="code" href="group__apr__file__stat.html#ga13">00161</a> <span class="preprocessor">#define APR_FINFO_GROUP  0x00020000 </span><span class="comment">/**&lt; Group */</span>
<a name="l00162"></a><a class="code" href="group__apr__file__stat.html#ga14">00162</a> <span class="preprocessor">#define APR_FINFO_UPROT  0x00100000 </span><span class="comment">/**&lt; User protection bits */</span>
<a name="l00163"></a><a class="code" href="group__apr__file__stat.html#ga15">00163</a> <span class="preprocessor">#define APR_FINFO_GPROT  0x00200000 </span><span class="comment">/**&lt; Group protection bits */</span>
<a name="l00164"></a><a class="code" href="group__apr__file__stat.html#ga16">00164</a> <span class="preprocessor">#define APR_FINFO_WPROT  0x00400000 </span><span class="comment">/**&lt; World protection bits */</span>
<a name="l00165"></a><a class="code" href="group__apr__file__stat.html#ga17">00165</a> <span class="preprocessor">#define APR_FINFO_ICASE  0x01000000 </span><span class="comment">/**&lt; if dev is case insensitive */</span>
<a name="l00166"></a><a class="code" href="group__apr__file__stat.html#ga18">00166</a> <span class="preprocessor">#define APR_FINFO_NAME   0x02000000 </span><span class="comment">/**&lt; -&gt;name in proper case */</span>
00167 
<a name="l00168"></a><a class="code" href="group__apr__file__stat.html#ga19">00168</a> <span class="preprocessor">#define APR_FINFO_MIN    0x00008170 </span><span class="comment">/**&lt; type, mtime, ctime, atime, size */</span>
<a name="l00169"></a><a class="code" href="group__apr__file__stat.html#ga20">00169</a> <span class="preprocessor">#define APR_FINFO_IDENT  0x00003000 </span><span class="comment">/**&lt; dev and inode */</span>
<a name="l00170"></a><a class="code" href="group__apr__file__stat.html#ga21">00170</a> <span class="preprocessor">#define APR_FINFO_OWNER  0x00030000 </span><span class="comment">/**&lt; user and group */</span>
<a name="l00171"></a><a class="code" href="group__apr__file__stat.html#ga22">00171</a> <span class="preprocessor">#define APR_FINFO_PROT   0x00700000 </span><span class="comment">/**&lt;  all protections */</span>
<a name="l00172"></a><a class="code" href="group__apr__file__stat.html#ga23">00172</a> <span class="preprocessor">#define APR_FINFO_NORM   0x0073b170 </span><span class="comment">/**&lt;  an atomic unix apr_stat() */</span>
<a name="l00173"></a><a class="code" href="group__apr__file__stat.html#ga24">00173</a> <span class="preprocessor">#define APR_FINFO_DIRENT 0x02000000 </span><span class="comment">/**&lt;  an atomic unix apr_dir_read() */</span>
00174 <span class="comment"></span>
00175 <span class="comment">/**</span>
00176 <span class="comment"> * The file information structure.  This is analogous to the POSIX</span>
00177 <span class="comment"> * stat structure.</span>
00178 <span class="comment"> */</span>
<a name="l00179"></a><a class="code" href="structapr__finfo__t.html">00179</a> <span class="keyword">struct </span><a class="code" href="group__apr__file__stat.html#ga0">apr_finfo_t</a> {<span class="comment"></span>
00180 <span class="comment">    /** Allocates memory and closes lingering handles in the specified pool */</span>
<a name="l00181"></a><a class="code" href="structapr__finfo__t.html#o0">00181</a>     <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool;<span class="comment"></span>
00182 <span class="comment">    /** The bitmask describing valid fields of this apr_finfo_t structure </span>
00183 <span class="comment">     *  including all available 'wanted' fields and potentially more */</span>
<a name="l00184"></a><a class="code" href="structapr__finfo__t.html#o1">00184</a>     apr_int32_t valid;<span class="comment"></span>
00185 <span class="comment">    /** The access permissions of the file.  Mimics Unix access rights. */</span>
<a name="l00186"></a><a class="code" href="structapr__finfo__t.html#o2">00186</a>     <a class="code" href="group__apr__file__info.html#ga1">apr_fileperms_t</a> protection;<span class="comment"></span>
00187 <span class="comment">    /** The type of file.  One of APR_REG, APR_DIR, APR_CHR, APR_BLK, APR_PIPE, </span>
00188 <span class="comment">     * APR_LNK or APR_SOCK.  If the type is undetermined, the value is APR_NOFILE.</span>
00189 <span class="comment">     * If the type cannot be determined, the value is APR_UNKFILE.</span>
00190 <span class="comment">     */</span>
<a name="l00191"></a><a class="code" href="structapr__finfo__t.html#o3">00191</a>     <a class="code" href="group__apr__file__info.html#ga4">apr_filetype_e</a> filetype;<span class="comment"></span>
00192 <span class="comment">    /** The user id that owns the file */</span>
<a name="l00193"></a><a class="code" href="structapr__finfo__t.html#o4">00193</a>     <a class="code" href="group__apr__user.html#ga0">apr_uid_t</a> user;<span class="comment"></span>
00194 <span class="comment">    /** The group id that owns the file */</span>
<a name="l00195"></a><a class="code" href="structapr__finfo__t.html#o5">00195</a>     <a class="code" href="group__apr__user.html#ga1">apr_gid_t</a> group;<span class="comment"></span>
00196 <span class="comment">    /** The inode of the file. */</span>
<a name="l00197"></a><a class="code" href="structapr__finfo__t.html#o6">00197</a>     <a class="code" href="group__apr__file__info.html#ga2">apr_ino_t</a> inode;<span class="comment"></span>
00198 <span class="comment">    /** The id of the device the file is on. */</span>
<a name="l00199"></a><a class="code" href="structapr__finfo__t.html#o7">00199</a>     <a class="code" href="group__apr__file__info.html#ga3">apr_dev_t</a> device;<span class="comment"></span>
00200 <span class="comment">    /** The number of hard links to the file. */</span>
<a name="l00201"></a><a class="code" href="structapr__finfo__t.html#o8">00201</a>     apr_int32_t nlink;<span class="comment"></span>
00202 <span class="comment">    /** The size of the file */</span>
<a name="l00203"></a><a class="code" href="structapr__finfo__t.html#o9">00203</a>     apr_off_t size;<span class="comment"></span>
00204 <span class="comment">    /** The storage size consumed by the file */</span>
<a name="l00205"></a><a class="code" href="structapr__finfo__t.html#o10">00205</a>     apr_off_t csize;<span class="comment"></span>
00206 <span class="comment">    /** The time the file was last accessed */</span>
<a name="l00207"></a><a class="code" href="structapr__finfo__t.html#o11">00207</a>     <a class="code" href="group__apr__time.html#ga2">apr_time_t</a> atime;<span class="comment"></span>
00208 <span class="comment">    /** The time the file was last modified */</span>
<a name="l00209"></a><a class="code" href="structapr__finfo__t.html#o12">00209</a>     <a class="code" href="group__apr__time.html#ga2">apr_time_t</a> mtime;<span class="comment"></span>
00210 <span class="comment">    /** The time the file was created, or the inode was last changed */</span>
<a name="l00211"></a><a class="code" href="structapr__finfo__t.html#o13">00211</a>     <a class="code" href="group__apr__time.html#ga2">apr_time_t</a> ctime;<span class="comment"></span>
00212 <span class="comment">    /** The pathname of the file (possibly unrooted) */</span>
<a name="l00213"></a><a class="code" href="structapr__finfo__t.html#o14">00213</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *fname;<span class="comment"></span>
00214 <span class="comment">    /** The file's name (no path) in filesystem case */</span>
<a name="l00215"></a><a class="code" href="structapr__finfo__t.html#o15">00215</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *name;<span class="comment"></span>
00216 <span class="comment">    /** The file's handle, if accessed (can be submitted to apr_duphandle) */</span>
<a name="l00217"></a><a class="code" href="structapr__finfo__t.html#o16">00217</a>     <span class="keyword">struct </span><a class="code" href="group__apr__file__io.html#ga2">apr_file_t</a> *filehand;
00218 };
00219 <span class="comment"></span>
00220 <span class="comment">/**</span>
00221 <span class="comment"> * get the specified file's stats.  The file is specified by filename, </span>
00222 <span class="comment"> * instead of using a pre-opened file.</span>
00223 <span class="comment"> * @param finfo Where to store the information about the file, which is</span>
00224 <span class="comment"> * never touched if the call fails.</span>
00225 <span class="comment"> * @param fname The name of the file to stat.</span>
00226 <span class="comment"> * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values </span>
00227 <span class="comment"> * @param pool the pool to use to allocate the new file. </span>
00228 <span class="comment"> */</span> 
00229 <a class="code" href="group__apr__platform.html#ga123">APR_DECLARE</a>(apr_status_t) apr_stat(apr_finfo_t *finfo, const <span class="keywordtype">char</span> *fname,
00230                                    apr_int32_t wanted, apr_pool_t *pool);
00231 <span class="comment"></span>
00232 <span class="comment">/** @} */</span><span class="comment"></span>
00233 <span class="comment">/**</span>
00234 <span class="comment"> * @defgroup apr_dir Directory Manipulation Functions</span>
00235 <span class="comment"> * @{</span>
00236 <span class="comment"> */</span>
00237 <span class="comment"></span>
00238 <span class="comment">/**</span>
00239 <span class="comment"> * Open the specified directory.</span>
00240 <span class="comment"> * @param new_dir The opened directory descriptor.</span>
00241 <span class="comment"> * @param dirname The full path to the directory (use / on all systems)</span>
00242 <span class="comment"> * @param pool The pool to use.</span>
00243 <span class="comment"> */</span>                        
00244 APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new_dir, 
00245                                        const <span class="keywordtype">char</span> *dirname, 
00246                                        apr_pool_t *pool);
00247 <span class="comment"></span>
00248 <span class="comment">/**</span>
00249 <span class="comment"> * close the specified directory. </span>
00250 <span class="comment"> * @param thedir the directory descriptor to close.</span>
00251 <span class="comment"> */</span>                        
00252 APR_DECLARE(apr_status_t) apr_dir_close(apr_dir_t *thedir);
00253 <span class="comment"></span>
00254 <span class="comment">/**</span>
00255 <span class="comment"> * Read the next entry from the specified directory. </span>
00256 <span class="comment"> * @param finfo the file info structure and filled in by apr_dir_read</span>
00257 <span class="comment"> * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values </span>
00258 <span class="comment"> * @param thedir the directory descriptor returned from apr_dir_open</span>
00259 <span class="comment"> * @remark No ordering is guaranteed for the entries read.</span>
00260 <span class="comment"> */</span>                        
00261 APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
00262                                        apr_dir_t *thedir);
00263 <span class="comment"></span>
00264 <span class="comment">/**</span>
00265 <span class="comment"> * Rewind the directory to the first entry.</span>
00266 <span class="comment"> * @param thedir the directory descriptor to rewind.</span>
00267 <span class="comment"> */</span>                        
00268 APR_DECLARE(apr_status_t) apr_dir_rewind(apr_dir_t *thedir);<span class="comment"></span>
00269 <span class="comment">/** @} */</span>
00270 <span class="comment"></span>
00271 <span class="comment">/**</span>
00272 <span class="comment"> * @defgroup apr_filepath Filepath Manipulation Functions</span>
00273 <span class="comment"> * @{</span>
00274 <span class="comment"> */</span>
00275 <span class="comment"></span>
00276 <span class="comment">/** Cause apr_filepath_merge to fail if addpath is above rootpath */</span>
<a name="l00277"></a><a class="code" href="group__apr__filepath.html#ga7">00277</a> #define APR_FILEPATH_NOTABOVEROOT   0x01
00278 <span class="comment"></span>
00279 <span class="comment">/** internal: Only meaningful with APR_FILEPATH_NOTABOVEROOT */</span>
<a name="l00280"></a><a class="code" href="group__apr__filepath.html#ga8">00280</a> #define APR_FILEPATH_SECUREROOTTEST 0x02
00281 <span class="comment"></span>
00282 <span class="comment">/** Cause apr_filepath_merge to fail if addpath is above rootpath,</span>
00283 <span class="comment"> * even given a rootpath /foo/bar and an addpath ../bar/bash</span>
00284 <span class="comment"> */</span>
<a name="l00285"></a><a class="code" href="group__apr__filepath.html#ga9">00285</a> #define APR_FILEPATH_SECUREROOT     0x03
00286 <span class="comment"></span>
00287 <span class="comment">/** Fail apr_filepath_merge if the merged path is relative */</span>
<a name="l00288"></a><a class="code" href="group__apr__filepath.html#ga10">00288</a> #define APR_FILEPATH_NOTRELATIVE    0x04
00289 <span class="comment"></span>
00290 <span class="comment">/** Fail apr_filepath_merge if the merged path is absolute */</span>
<a name="l00291"></a><a class="code" href="group__apr__filepath.html#ga11">00291</a> #define APR_FILEPATH_NOTABSOLUTE    0x08
00292 <span class="comment"></span>
00293 <span class="comment">/** Return the file system's native path format (e.g. path delimiters</span>
00294 <span class="comment"> * of ':' on MacOS9, '\' on Win32, etc.) */</span>
<a name="l00295"></a><a class="code" href="group__apr__filepath.html#ga12">00295</a> #define APR_FILEPATH_NATIVE         0x10
00296 <span class="comment"></span>
00297 <span class="comment">/** Resolve the true case of existing directories and file elements</span>
00298 <span class="comment"> * of addpath, (resolving any aliases on Win32) and append a proper </span>
00299 <span class="comment"> * trailing slash if a directory</span>
00300 <span class="comment"> */</span>
<a name="l00301"></a><a class="code" href="group__apr__filepath.html#ga13">00301</a> #define APR_FILEPATH_TRUENAME       0x20
00302 <span class="comment"></span>
00303 <span class="comment">/**</span>
00304 <span class="comment"> * Extract the rootpath from the given filepath</span>
00305 <span class="comment"> * @param rootpath the root file path returned with APR_SUCCESS or APR_EINCOMPLETE</span>
00306 <span class="comment"> * @param filepath the pathname to parse for its root component</span>
00307 <span class="comment"> * @param flags the desired rules to apply, from</span>
00308 <span class="comment"> * &lt;PRE&gt;</span>
00309 <span class="comment"> *      APR_FILEPATH_NATIVE    Use native path seperators (e.g. '\' on Win32)</span>
00310 <span class="comment"> *      APR_FILEPATH_TRUENAME  Tests that the root exists, and makes it proper</span>
00311 <span class="comment"> * &lt;/PRE&gt;</span>
00312 <span class="comment"> * @param p the pool to allocate the new path string from</span>
00313 <span class="comment"> * @remark on return, filepath points to the first non-root character in the</span>
00314 <span class="comment"> * given filepath.  In the simplest example, given a filepath of "/foo", </span>
00315 <span class="comment"> * returns the rootpath of "/" and filepath points at "foo".  This is far </span>
00316 <span class="comment"> * more complex on other platforms, which will canonicalize the root form</span>
00317 <span class="comment"> * to a consistant format, given the APR_FILEPATH_TRUENAME flag, and also</span>
00318 <span class="comment"> * test for the validity of that root (e.g., that a drive d:/ or network </span>
00319 <span class="comment"> * share //machine/foovol/). </span>
00320 <span class="comment"> * The function returns APR_ERELATIVE if filepath isn't rooted (an</span>
00321 <span class="comment"> * error), APR_EINCOMPLETE if the root path is ambigious (but potentially</span>
00322 <span class="comment"> * legitimate, e.g. "/" on Windows is incomplete because it doesn't specify</span>
00323 <span class="comment"> * the drive letter), or APR_EBADPATH if the root is simply invalid.</span>
00324 <span class="comment"> * APR_SUCCESS is returned if filepath is an absolute path.</span>
00325 <span class="comment"> */</span>
00326 APR_DECLARE(apr_status_t) apr_filepath_root(const <span class="keywordtype">char</span> **rootpath, 
00327                                             const <span class="keywordtype">char</span> **filepath, 
00328                                             apr_int32_t flags,
00329                                             apr_pool_t *p);
00330 <span class="comment"></span>
00331 <span class="comment">/**</span>
00332 <span class="comment"> * Merge additional file path onto the previously processed rootpath</span>
00333 <span class="comment"> * @param newpath the merged paths returned</span>
00334 <span class="comment"> * @param rootpath the root file path (NULL uses the current working path)</span>
00335 <span class="comment"> * @param addpath the path to add to the root path</span>
00336 <span class="comment"> * @param flags the desired APR_FILEPATH_ rules to apply when merging</span>
00337 <span class="comment"> * @param p the pool to allocate the new path string from</span>
00338 <span class="comment"> * @remark if the flag APR_FILEPATH_TRUENAME is given, and the addpath </span>
00339 <span class="comment"> * contains wildcard characters ('*', '?') on platforms that don't support </span>
00340 <span class="comment"> * such characters within filenames, the paths will be merged, but the </span>
00341 <span class="comment"> * result code will be APR_EPATHWILD, and all further segments will not</span>
00342 <span class="comment"> * reflect the true filenames including the wildcard and following segments.</span>
00343 <span class="comment"> */</span>                        
00344 APR_DECLARE(apr_status_t) apr_filepath_merge(<span class="keywordtype">char</span> **newpath, 
00345                                              const <span class="keywordtype">char</span> *rootpath,
00346                                              const <span class="keywordtype">char</span> *addpath, 
00347                                              apr_int32_t flags,
00348                                              apr_pool_t *p);
00349 <span class="comment"></span>
00350 <span class="comment">/**</span>
00351 <span class="comment"> * Split a search path into separate components</span>
00352 <span class="comment"> * @param pathelts the returned components of the search path</span>
00353 <span class="comment"> * @param liststr the search path (e.g., &lt;tt&gt;getenv("PATH")&lt;/tt&gt;)</span>
00354 <span class="comment"> * @param p the pool to allocate the array and path components from</span>
00355 <span class="comment"> * @remark empty path componenta do not become part of @a pathelts.</span>
00356 <span class="comment"> * @remark the path separator in @a liststr is system specific;</span>
00357 <span class="comment"> * e.g., ':' on Unix, ';' on Windows, etc.</span>
00358 <span class="comment"> */</span>
00359 APR_DECLARE(apr_status_t) apr_filepath_list_split(<a class="code" href="structapr__array__header__t.html">apr_array_header_t</a> **pathelts,
00360                                                   const <span class="keywordtype">char</span> *liststr,
00361                                                   apr_pool_t *p);
00362 <span class="comment"></span>
00363 <span class="comment">/**</span>
00364 <span class="comment"> * Merge a list of search path components into a single search path</span>
00365 <span class="comment"> * @param liststr the returned search path; may be NULL if @a pathelts is empty</span>
00366 <span class="comment"> * @param pathelts the components of the search path</span>
00367 <span class="comment"> * @param p the pool to allocate the search path from</span>
00368 <span class="comment"> * @remark emtpy strings in the source array are ignored.</span>
00369 <span class="comment"> * @remark the path separator in @a liststr is system specific;</span>
00370 <span class="comment"> * e.g., ':' on Unix, ';' on Windows, etc.</span>
00371 <span class="comment"> */</span>
00372 APR_DECLARE(apr_status_t) apr_filepath_list_merge(<span class="keywordtype">char</span> **liststr,
00373                                                   <a class="code" href="structapr__array__header__t.html">apr_array_header_t</a> *pathelts,
00374                                                   apr_pool_t *p);
00375 <span class="comment"></span>
00376 <span class="comment">/**</span>
00377 <span class="comment"> * Return the default file path (for relative file names)</span>
00378 <span class="comment"> * @param path the default path string returned</span>
00379 <span class="comment"> * @param flags optional flag APR_FILEPATH_NATIVE to retrieve the</span>
00380 <span class="comment"> *              default file path in os-native format.</span>
00381 <span class="comment"> * @param p the pool to allocate the default path string from</span>
00382 <span class="comment"> */</span>
00383 APR_DECLARE(apr_status_t) apr_filepath_get(<span class="keywordtype">char</span> **path, apr_int32_t flags,
00384                                            apr_pool_t *p);
00385 <span class="comment"></span>
00386 <span class="comment">/**</span>
00387 <span class="comment"> * Set the default file path (for relative file names)</span>
00388 <span class="comment"> * @param path the default path returned</span>
00389 <span class="comment"> * @param p the pool to allocate any working storage</span>
00390 <span class="comment"> */</span>
00391 APR_DECLARE(apr_status_t) apr_filepath_set(const <span class="keywordtype">char</span> *path, apr_pool_t *p);
00392 <span class="comment"></span>
00393 <span class="comment">/** The FilePath character encoding is unknown */</span>
<a name="l00394"></a><a class="code" href="group__apr__filepath.html#ga14">00394</a> #define APR_FILEPATH_ENCODING_UNKNOWN  0
00395 <span class="comment"></span>
00396 <span class="comment">/** The FilePath character encoding is locale-dependent */</span>
<a name="l00397"></a><a class="code" href="group__apr__filepath.html#ga15">00397</a> #define APR_FILEPATH_ENCODING_LOCALE   1
00398 <span class="comment"></span>
00399 <span class="comment">/** The FilePath character encoding is UTF-8 */</span>
<a name="l00400"></a><a class="code" href="group__apr__filepath.html#ga16">00400</a> #define APR_FILEPATH_ENCODING_UTF8     2
00401 <span class="comment"></span>
00402 <span class="comment">/**</span>
00403 <span class="comment"> * Determine the encoding used internally by the FilePath functions</span>
00404 <span class="comment"> * @param style points to a variable which receives the encoding style flag</span>
00405 <span class="comment"> * @param p the pool to allocate any working storage</span>
00406 <span class="comment"> * @remark Use @c apr_os_locale_encoding and/or @c apr_os_default_encoding</span>
00407 <span class="comment"> * to get the name of the path encoding if it's not UTF-8.</span>
00408 <span class="comment"> */</span>
00409 APR_DECLARE(apr_status_t) apr_filepath_encoding(<span class="keywordtype">int</span> *style, apr_pool_t *p);<span class="comment"></span>
00410 <span class="comment">/** @} */</span>
00411 <span class="comment"></span>
00412 <span class="comment">/** @} */</span>
00413 
00414 #ifdef __cplusplus
00415 }
00416 #endif
00417 
00418 #endif  <span class="comment">/* ! APR_FILE_INFO_H */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Mar 20 19:52:26 2005 for Apache Portable Runtime by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
</body>
</html>