diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h index d89aee0ad..e05cb4409 100644 --- a/src/os/unix/ngx_files.h +++ b/src/os/unix/ngx_files.h @@ -81,6 +81,7 @@ ngx_int_t ngx_set_file_time(u_char *name, ngx_fd_t fd, time_t s); #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_access(sb) ((sb)->st_mode & 0777) #define ngx_file_size(sb) (sb)->st_size #define ngx_file_mtime(sb) (sb)->st_mtime #define ngx_file_uniq(sb) (sb)->st_ino @@ -128,6 +129,7 @@ ngx_int_t ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir); #define ngx_de_is_dir(dir) (S_ISDIR((dir)->info.st_mode)) #define ngx_de_is_file(dir) (S_ISREG((dir)->info.st_mode)) #define ngx_de_is_link(dir) (S_ISLNK((dir)->info.st_mode)) +#define ngx_de_access(dir) (((dir)->info.st_mode) & 0777) #define ngx_de_size(dir) (dir)->info.st_size #define ngx_de_mtime(dir) (dir)->info.st_mtime diff --git a/src/os/win32/ngx_files.h b/src/os/win32/ngx_files.h index 132b6221b..7db5c8100 100644 --- a/src/os/win32/ngx_files.h +++ b/src/os/win32/ngx_files.h @@ -99,6 +99,7 @@ ngx_int_t ngx_file_info(u_char *filename, ngx_file_info_t *fi); #define ngx_is_file(fi) !((fi)->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) #define ngx_is_link(fi) 0 +#define ngx_file_access(fi) 0 #define ngx_file_size(fi) \ (((off_t) (fi)->nFileSizeHigh << 32) | (fi)->nFileSizeLow) @@ -157,6 +158,7 @@ ngx_int_t ngx_de_link_info(u_char *name, ngx_dir_t *dir); #define ngx_de_is_file(dir) \ !((dir)->finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) #define ngx_de_is_link(dir) 0 +#define ngx_de_access(dir) 0 #define ngx_de_size(dir) \ (((off_t) (dir)->finddata.nFileSizeHigh << 32) | (dir)->finddata.nFileSizeLow)