Apache HTTPD
apr_file_info.h
Go to the documentation of this file.
1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef APR_FILE_INFO_H
18#define APR_FILE_INFO_H
19
25#include "apr.h"
26#include "apr_user.h"
27#include "apr_pools.h"
28#include "apr_tables.h"
29#include "apr_time.h"
30#include "apr_errno.h"
31
32#if APR_HAVE_SYS_UIO_H
33#include <sys/uio.h>
34#endif
35
36#ifdef __cplusplus
37extern "C" {
38#endif /* __cplusplus */
39
46/* Many applications use the type member to determine the
47 * existance of a file or initialization of the file info,
48 * so the APR_NOFILE value must be distinct from APR_UNKFILE.
49 */
50
73
79#define APR_FPROT_USETID 0x8000
80#define APR_FPROT_UREAD 0x0400
81#define APR_FPROT_UWRITE 0x0200
82#define APR_FPROT_UEXECUTE 0x0100
84#define APR_FPROT_GSETID 0x4000
85#define APR_FPROT_GREAD 0x0040
86#define APR_FPROT_GWRITE 0x0020
87#define APR_FPROT_GEXECUTE 0x0010
89#define APR_FPROT_WSTICKY 0x2000
90#define APR_FPROT_WREAD 0x0004
91#define APR_FPROT_WWRITE 0x0002
92#define APR_FPROT_WEXECUTE 0x0001
94#define APR_FPROT_OS_DEFAULT 0x0FFF
96/* additional permission flags for apr_file_copy and apr_file_append */
97#define APR_FPROT_FILE_SOURCE_PERMS 0x1000
99/* backcompat */
100#define APR_USETID APR_FPROT_USETID
101#define APR_UREAD APR_FPROT_UREAD
102#define APR_UWRITE APR_FPROT_UWRITE
103#define APR_UEXECUTE APR_FPROT_UEXECUTE
104#define APR_GSETID APR_FPROT_GSETID
105#define APR_GREAD APR_FPROT_GREAD
106#define APR_GWRITE APR_FPROT_GWRITE
107#define APR_GEXECUTE APR_FPROT_GEXECUTE
108#define APR_WSTICKY APR_FPROT_WSTICKY
109#define APR_WREAD APR_FPROT_WREAD
110#define APR_WWRITE APR_FPROT_WWRITE
111#define APR_WEXECUTE APR_FPROT_WEXECUTE
112#define APR_OS_DEFAULT APR_FPROT_OS_DEFAULT
113#define APR_FILE_SOURCE_PERMS APR_FPROT_FILE_SOURCE_PERMS
121typedef struct apr_dir_t apr_dir_t;
126#if (defined WIN32) || (defined NETWARE)
130typedef apr_uint32_t apr_dev_t;
131#else
136#endif
137
144
145#define APR_FINFO_LINK 0x00000001
146#define APR_FINFO_MTIME 0x00000010
147#define APR_FINFO_CTIME 0x00000020
148#define APR_FINFO_ATIME 0x00000040
149#define APR_FINFO_SIZE 0x00000100
150#define APR_FINFO_CSIZE 0x00000200
151#define APR_FINFO_DEV 0x00001000
152#define APR_FINFO_INODE 0x00002000
153#define APR_FINFO_NLINK 0x00004000
154#define APR_FINFO_TYPE 0x00008000
155#define APR_FINFO_USER 0x00010000
156#define APR_FINFO_GROUP 0x00020000
157#define APR_FINFO_UPROT 0x00100000
158#define APR_FINFO_GPROT 0x00200000
159#define APR_FINFO_WPROT 0x00400000
160#define APR_FINFO_ICASE 0x01000000
161#define APR_FINFO_NAME 0x02000000
163#define APR_FINFO_MIN 0x00008170
164#define APR_FINFO_IDENT 0x00003000
165#define APR_FINFO_OWNER 0x00030000
166#define APR_FINFO_PROT 0x00700000
167#define APR_FINFO_NORM 0x0073b170
168#define APR_FINFO_DIRENT 0x02000000
214
231
245 const char *dirname,
247
253
269
287#define APR_FILEPATH_NOTABOVEROOT 0x01
288
290#define APR_FILEPATH_SECUREROOTTEST 0x02
291
295#define APR_FILEPATH_SECUREROOT 0x03
296
298#define APR_FILEPATH_NOTRELATIVE 0x04
299
301#define APR_FILEPATH_NOTABSOLUTE 0x08
302
305#define APR_FILEPATH_NATIVE 0x10
306
311#define APR_FILEPATH_TRUENAME 0x20
312
337 const char **filepath,
340
355 const char *rootpath,
356 const char *addpath,
358 apr_pool_t *p);
359
370 const char *liststr,
371 apr_pool_t *p);
372
384 apr_pool_t *p);
385
394 apr_pool_t *p);
395
402
404#define APR_FILEPATH_ENCODING_UNKNOWN 0
405
407#define APR_FILEPATH_ENCODING_LOCALE 1
408
410#define APR_FILEPATH_ENCODING_UTF8 2
411
424#ifdef __cplusplus
425}
426#endif
427
428#endif /* ! APR_FILE_INFO_H */
APR Error Codes.
APR memory allocation.
APR Table library.
APR Time Library.
APR User ID Services.
request_rec int int apr_table_t const char * path
const apr_xml_elem int style
Definition apr_xml.h:287
const void apr_status_t(*) apr_status_t(* APR_DECLARE)(void) apr_pool_pre_cleanup_register(apr_pool_t *p
Definition apr_pools.h:646
apr_size_t size
const char * dirname
apr_int32_t apr_dir_t * thedir
int apr_status_t
Definition apr_errno.h:44
apr_int32_t apr_fileperms_t
dev_t apr_dev_t
apr_filetype_e
@ APR_BLK
@ APR_PIPE
@ APR_LNK
@ APR_UNKFILE
@ APR_REG
@ APR_CHR
@ APR_SOCK
@ APR_DIR
@ APR_NOFILE
const char apr_int32_t wanted
const char apr_int32_t apr_pool_t * pool
const char * fname
const char apr_int32_t flags
const char const char * addpath
const char apr_int32_t apr_pool_t * p
const char * rootpath
const char * liststr
const char ** filepath
apr_array_header_t * pathelts
apr_int64_t apr_time_t
Definition apr_time.h:45
gid_t apr_gid_t
Definition apr_user.h:54
uid_t apr_uid_t
Definition apr_user.h:45
apr_finfo_t * finfo
apr_gid_t group
apr_filetype_e filetype
const char * name
apr_dev_t device
apr_off_t size
apr_pool_t * pool
apr_ino_t inode
struct apr_file_t * filehand
apr_fileperms_t protection
apr_int32_t nlink
apr_uid_t user
const char * fname
apr_time_t atime
apr_off_t csize
apr_time_t ctime
apr_time_t mtime
apr_int32_t valid
apr_status_t apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted, apr_dir_t *thedir)
Definition dir.c:142
apr_status_t apr_dir_close(apr_dir_t *thedir)
Definition dir.c:109
apr_status_t apr_dir_open(apr_dir_t **new, const char *dirname, apr_pool_t *pool)
Definition dir.c:75
apr_status_t apr_dir_rewind(apr_dir_t *thedir)
Definition dir.c:291