2002-08-07 00:39:45 +08:00
|
|
|
|
2004-09-28 16:34:51 +08:00
|
|
|
/*
|
2004-09-30 00:00:49 +08:00
|
|
|
* Copyright (C) Igor Sysoev
|
2004-09-28 16:34:51 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2002-12-27 15:27:47 +08:00
|
|
|
#include <ngx_config.h>
|
2003-11-10 04:03:38 +08:00
|
|
|
#include <ngx_core.h>
|
2002-08-07 00:39:45 +08:00
|
|
|
|
|
|
|
|
2002-08-20 22:48:28 +08:00
|
|
|
int ngx_file_type(char *file, ngx_file_info_t *sb)
|
|
|
|
{
|
|
|
|
sb->dwFileAttributes = GetFileAttributes(file);
|
|
|
|
|
|
|
|
if (sb->dwFileAttributes == INVALID_FILE_ATTRIBUTES) {
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2002-08-07 00:39:45 +08:00
|
|
|
int ngx_stat(char *file, ngx_stat_t *sb)
|
|
|
|
{
|
|
|
|
*sb = GetFileAttributes(file);
|
|
|
|
|
|
|
|
if (*sb == INVALID_FILE_ATTRIBUTES) {
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2002-08-20 22:48:28 +08:00
|
|
|
*/
|