Mercurial > hg > nginx-quic
annotate src/os/unix/ngx_files.h @ 1332:483f0cd87acf
omit unnecessary code
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 22 Jul 2007 19:11:52 +0000 |
parents | b2e6eb425770 |
children | 3ca17d430c9a |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
4 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
5 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
6 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
7 #ifndef _NGX_FILES_H_INCLUDED_ |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
8 #define _NGX_FILES_H_INCLUDED_ |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 |
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
57
a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
26
diff
changeset
|
11 #include <ngx_config.h> |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
12 #include <ngx_core.h> |
57
a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
26
diff
changeset
|
13 |
a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
26
diff
changeset
|
14 |
26
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
24
diff
changeset
|
15 #define NGX_INVALID_FILE -1 |
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
24
diff
changeset
|
16 #define NGX_FILE_ERROR -1 |
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
24
diff
changeset
|
17 |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
18 |
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
19 |
1048
c4f666fc3a7e
ngx_open_file(name, access, create) > ngx_open_file(name, mode, create, access)
Igor Sysoev <igor@sysoev.ru>
parents:
1046
diff
changeset
|
20 #define ngx_open_file(name, mode, create, access) \ |
c4f666fc3a7e
ngx_open_file(name, access, create) > ngx_open_file(name, mode, create, access)
Igor Sysoev <igor@sysoev.ru>
parents:
1046
diff
changeset
|
21 open((const char *) name, mode|create, access) |
5
62b1a364857c
nginx-0.0.1-2002-08-23-20:14:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
22 #define ngx_open_file_n "open()" |
62b1a364857c
nginx-0.0.1-2002-08-23-20:14:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
23 |
99
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
24 #define NGX_FILE_RDONLY O_RDONLY |
1054 | 25 #define NGX_FILE_WRONLY O_WRONLY |
99
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
26 #define NGX_FILE_RDWR O_RDWR |
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
27 #define NGX_FILE_CREATE_OR_OPEN O_CREAT |
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
28 #define NGX_FILE_OPEN 0 |
333
be40e9893a19
nginx-0.0.3-2004-05-11-20:16:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
303
diff
changeset
|
29 #define NGX_FILE_TRUNCATE O_TRUNC |
99
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
30 #define NGX_FILE_APPEND O_APPEND |
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
31 |
1048
c4f666fc3a7e
ngx_open_file(name, access, create) > ngx_open_file(name, mode, create, access)
Igor Sysoev <igor@sysoev.ru>
parents:
1046
diff
changeset
|
32 #define NGX_FILE_DEFAULT_ACCESS 0644 |
c4f666fc3a7e
ngx_open_file(name, access, create) > ngx_open_file(name, mode, create, access)
Igor Sysoev <igor@sysoev.ru>
parents:
1046
diff
changeset
|
33 |
99
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
34 |
24
77c7629a2627
nginx-0.0.1-2002-12-10-21:05:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
35 #define ngx_close_file close |
77c7629a2627
nginx-0.0.1-2002-12-10-21:05:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
36 #define ngx_close_file_n "close()" |
77c7629a2627
nginx-0.0.1-2002-12-10-21:05:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
37 |
99
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
38 |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
39 #define ngx_delete_file(name) unlink((const char *) name) |
185
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
40 #define ngx_delete_file_n "unlink()" |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
41 |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
42 |
633 | 43 ngx_fd_t ngx_open_tempfile(u_char *name, ngx_uint_t persistent, |
1046 | 44 ngx_uint_t access); |
74
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
45 #define ngx_open_tempfile_n "open()" |
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
46 |
99
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
47 |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
48 ssize_t ngx_read_file(ngx_file_t *file, u_char *buf, size_t size, off_t offset); |
5
62b1a364857c
nginx-0.0.1-2002-08-23-20:14:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
49 #define ngx_read_file_n "read()" |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
50 |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
51 ssize_t ngx_write_file(ngx_file_t *file, u_char *buf, size_t size, |
497 | 52 off_t offset); |
74
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
53 |
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
54 ssize_t ngx_write_chain_to_file(ngx_file_t *file, ngx_chain_t *ce, |
497 | 55 off_t offset, ngx_pool_t *pool); |
74
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
56 |
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
57 |
1055 | 58 #define ngx_read_fd read |
59 #define ngx_read_fd_n "read()" | |
60 | |
571 | 61 #define ngx_write_fd write |
1055 | 62 #define ngx_write_fd_n "write()" |
63 | |
571 | 64 #define ngx_linefeed(p) *p++ = LF; |
65 #define NGX_LINEFEED_SIZE 1 | |
66 | |
67 | |
633 | 68 #define ngx_rename_file(o, n) rename((const char *) o, (const char *) n) |
681 | 69 #define ngx_rename_file_n "rename()" |
170
c42be4185301
nginx-0.0.1-2003-11-03-01:56:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
99
diff
changeset
|
70 |
c42be4185301
nginx-0.0.1-2003-11-03-01:56:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
99
diff
changeset
|
71 |
669 | 72 #define ngx_change_file_access(n, a) chmod((const char *) n, a) |
681 | 73 #define ngx_change_file_access_n "chmod()" |
74 | |
75 | |
76 ngx_int_t ngx_set_file_time(u_char *name, ngx_fd_t fd, time_t s); | |
77 #define ngx_set_file_time_n "utimes()" | |
669 | 78 |
79 | |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
80 #define ngx_file_info(file, sb) stat((const char *) file, sb) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
81 #define ngx_file_info_n "stat()" |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
82 |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
83 #define ngx_fd_info(fd, sb) fstat(fd, sb) |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
84 #define ngx_fd_info_n "fstat()" |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
85 |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
86 #define ngx_is_dir(sb) (S_ISDIR((sb)->st_mode)) |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
87 #define ngx_is_file(sb) (S_ISREG((sb)->st_mode)) |
669 | 88 #define ngx_is_link(sb) (S_ISLNK((sb)->st_mode)) |
89 #define ngx_is_exec(sb) ((sb)->st_mode & S_IXUSR) | |
1053
b9fa23cda4cc
ngx_file_access() and ngx_de_access()
Igor Sysoev <igor@sysoev.ru>
parents:
1048
diff
changeset
|
90 #define ngx_file_access(sb) ((sb)->st_mode & 0777) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
91 #define ngx_file_size(sb) (sb)->st_size |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
92 #define ngx_file_mtime(sb) (sb)->st_mtime |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
93 #define ngx_file_uniq(sb) (sb)->st_ino |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
94 |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
95 |
336
ca9a7f8c86da
nginx-0.0.3-2004-05-18-19:29:08 import
Igor Sysoev <igor@sysoev.ru>
parents:
333
diff
changeset
|
96 |
ca9a7f8c86da
nginx-0.0.3-2004-05-18-19:29:08 import
Igor Sysoev <igor@sysoev.ru>
parents:
333
diff
changeset
|
97 #define ngx_getcwd(buf, size) (getcwd(buf, size) != NULL) |
ca9a7f8c86da
nginx-0.0.3-2004-05-18-19:29:08 import
Igor Sysoev <igor@sysoev.ru>
parents:
333
diff
changeset
|
98 #define ngx_getcwd_n "getcwd()" |
ca9a7f8c86da
nginx-0.0.3-2004-05-18-19:29:08 import
Igor Sysoev <igor@sysoev.ru>
parents:
333
diff
changeset
|
99 #define NGX_MAX_PATH PATH_MAX |
ca9a7f8c86da
nginx-0.0.3-2004-05-18-19:29:08 import
Igor Sysoev <igor@sysoev.ru>
parents:
333
diff
changeset
|
100 |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
101 #define NGX_DIR_MASK_LEN 0 |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
102 |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
103 |
467 | 104 ngx_int_t ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir); |
185
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
105 #define ngx_open_dir_n "opendir()" |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
106 |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
107 |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
108 #define ngx_close_dir(d) closedir((d)->dir) |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
109 #define ngx_close_dir_n "closedir()" |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
110 |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
111 |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
112 #define ngx_read_dir(d) \ |
497 | 113 (((d)->de = readdir((d)->dir)) ? NGX_OK : NGX_ERROR) |
185
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
114 #define ngx_read_dir_n "readdir()" |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
115 |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
116 |
669 | 117 #define ngx_create_dir(name, access) mkdir((const char *) name, access) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
118 #define ngx_create_dir_n "mkdir()" |
74
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
119 |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
120 |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
121 #define ngx_delete_dir(name) rmdir((const char *) name) |
185
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
122 #define ngx_delete_dir_n "rmdir()" |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
123 |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
124 |
1089
b2e6eb425770
use ngx_dir_access() to enable search bits for directory
Igor Sysoev <igor@sysoev.ru>
parents:
1055
diff
changeset
|
125 #define ngx_dir_access(a) (a | (a & 0444) >> 2) |
b2e6eb425770
use ngx_dir_access() to enable search bits for directory
Igor Sysoev <igor@sysoev.ru>
parents:
1055
diff
changeset
|
126 |
b2e6eb425770
use ngx_dir_access() to enable search bits for directory
Igor Sysoev <igor@sysoev.ru>
parents:
1055
diff
changeset
|
127 |
457 | 128 #define ngx_de_name(dir) ((u_char *) (dir)->de->d_name) |
455 | 129 #if (NGX_FREEBSD) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
130 #define ngx_de_namelen(dir) (dir)->de->d_namlen |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
131 #else |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
132 #define ngx_de_namelen(dir) ngx_strlen((dir)->de->d_name) |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
133 #endif |
497 | 134 #define ngx_de_info(name, dir) stat((const char *) name, &(dir)->info) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
135 #define ngx_de_info_n "stat()" |
497 | 136 #define ngx_de_link_info(name, dir) lstat((const char *) name, &(dir)->info) |
137 #define ngx_de_link_info_n "lstat()" | |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
138 #define ngx_de_is_dir(dir) (S_ISDIR((dir)->info.st_mode)) |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
139 #define ngx_de_is_file(dir) (S_ISREG((dir)->info.st_mode)) |
497 | 140 #define ngx_de_is_link(dir) (S_ISLNK((dir)->info.st_mode)) |
1053
b9fa23cda4cc
ngx_file_access() and ngx_de_access()
Igor Sysoev <igor@sysoev.ru>
parents:
1048
diff
changeset
|
141 #define ngx_de_access(dir) (((dir)->info.st_mode) & 0777) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
142 #define ngx_de_size(dir) (dir)->info.st_size |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
143 #define ngx_de_mtime(dir) (dir)->info.st_mtime |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
144 |
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
145 |
727 | 146 typedef struct { |
735
72621ebef255
fix building on Linux and Solaris
Igor Sysoev <igor@sysoev.ru>
parents:
727
diff
changeset
|
147 size_t n; |
727 | 148 glob_t pglob; |
149 u_char *pattern; | |
150 ngx_log_t *log; | |
151 } ngx_glob_t; | |
152 | |
153 | |
154 ngx_int_t ngx_open_glob(ngx_glob_t *gl); | |
155 #define ngx_open_glob_n "glob()" | |
156 ngx_int_t ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name); | |
157 void ngx_close_glob(ngx_glob_t *gl); | |
158 | |
159 | |
611 | 160 ngx_err_t ngx_trylock_fd(ngx_fd_t fd); |
161 ngx_err_t ngx_lock_fd(ngx_fd_t fd); | |
162 ngx_err_t ngx_unlock_fd(ngx_fd_t fd); | |
163 | |
164 #define ngx_trylock_fd_n "fcntl(F_SETLK, F_WRLCK)" | |
165 #define ngx_lock_fd_n "fcntl(F_SETLKW, F_WRLCK)" | |
166 #define ngx_unlock_fd_n "fcntl(F_SETLK, F_UNLCK)" | |
167 | |
168 | |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
169 #endif /* _NGX_FILES_H_INCLUDED_ */ |