2002-08-06 12:39:45 -04:00
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#include <ngx_stat.h>
|
|
|
|
|
2002-08-20 10:48:28 -04: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-06 12:39:45 -04: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 10:48:28 -04:00
|
|
|
*/
|