aboutsummaryrefslogtreecommitdiff
path: root/src/os/win32/ngx_stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/win32/ngx_stat.c')
-rw-r--r--src/os/win32/ngx_stat.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/os/win32/ngx_stat.c b/src/os/win32/ngx_stat.c
new file mode 100644
index 000000000..5b1af3014
--- /dev/null
+++ b/src/os/win32/ngx_stat.c
@@ -0,0 +1,15 @@
+
+#include <windows.h>
+
+#include <ngx_stat.h>
+
+int ngx_stat(char *file, ngx_stat_t *sb)
+{
+ *sb = GetFileAttributes(file);
+
+ if (*sb == INVALID_FILE_ATTRIBUTES) {
+ return -1;
+ }
+
+ return 0;
+}