aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_files.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_files.c')
-rw-r--r--src/os/unix/ngx_files.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c
index 8d2733821..ab861467e 100644
--- a/src/os/unix/ngx_files.c
+++ b/src/os/unix/ngx_files.c
@@ -249,12 +249,33 @@ ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir)
}
dir->valid_info = 0;
+#if (NGX_HAVE_D_TYPE)
+ dir->valid_type = 1;
+#else
+ dir->valid_type = 0;
+#endif
return NGX_OK;
}
ngx_int_t
+ngx_read_dir(ngx_dir_t *dir)
+{
+ dir->de = readdir(dir->dir);
+
+ if (dir->de) {
+#if (NGX_HAVE_D_TYPE)
+ dir->type = dir->de->d_type;
+#endif
+ return NGX_OK;
+ }
+
+ return NGX_ERROR;
+}
+
+
+ngx_int_t
ngx_open_glob(ngx_glob_t *gl)
{
int n;