aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_files.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-08-04 16:04:04 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-08-04 16:04:04 +0000
commitb71c690895870290663dd4eef453d195209269ce (patch)
treef95ec569e2482a95ee2789e5e25991d0fbbb92e6 /src/os/unix/ngx_files.h
parent9bda615eef680b3a2ea8ceccb51a872a4bcc340e (diff)
downloadnginx-b71c690895870290663dd4eef453d195209269ce.tar.gz
nginx-b71c690895870290663dd4eef453d195209269ce.zip
nginx-0.3.56-RELEASE importrelease-0.3.56
*) Feature: the "dav_access" directive. *) Feature: the "if" directive supports the "-d", "!-d", "-e", "!-e", "-x", and "!-x" operators. *) Bugfix: a segmentation fault occurred if a request returned a redirect and some sent to client header lines were logged in the access log.
Diffstat (limited to 'src/os/unix/ngx_files.h')
-rw-r--r--src/os/unix/ngx_files.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h
index 29b649583..dffef52a5 100644
--- a/src/os/unix/ngx_files.h
+++ b/src/os/unix/ngx_files.h
@@ -61,6 +61,10 @@ ssize_t ngx_write_chain_to_file(ngx_file_t *file, ngx_chain_t *ce,
#define ngx_rename_file_n "rename"
+#define ngx_change_file_access(n, a) chmod((const char *) n, a)
+#define ngx_change_file_access_n "chmod"
+
+
#define ngx_file_info(file, sb) stat((const char *) file, sb)
#define ngx_file_info_n "stat()"
@@ -69,6 +73,8 @@ ssize_t ngx_write_chain_to_file(ngx_file_t *file, ngx_chain_t *ce,
#define ngx_is_dir(sb) (S_ISDIR((sb)->st_mode))
#define ngx_is_file(sb) (S_ISREG((sb)->st_mode))
+#define ngx_is_link(sb) (S_ISLNK((sb)->st_mode))
+#define ngx_is_exec(sb) ((sb)->st_mode & S_IXUSR)
#define ngx_file_size(sb) (sb)->st_size
#define ngx_file_mtime(sb) (sb)->st_mtime
#define ngx_file_uniq(sb) (sb)->st_ino
@@ -95,7 +101,7 @@ ngx_int_t ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir);
#define ngx_read_dir_n "readdir()"
-#define ngx_create_dir(name) mkdir((const char *) name, 0700)
+#define ngx_create_dir(name, access) mkdir((const char *) name, access)
#define ngx_create_dir_n "mkdir()"