Mercurial > hg > nginx-quic
comparison src/os/win32/ngx_files.c @ 467:bbd6b0b4a2b1 release-0.1.8
nginx-0.1.8-RELEASE import
*) Bugfix: in the ngx_http_autoindex_module if the long file names were
in the listing.
*) Feature: the "^~" modifier in the location directive.
*) Feature: the proxy_max_temp_file_size directive.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 20 Nov 2004 19:52:20 +0000 |
parents | a88a3e4e158f |
children | 64d9afb209da |
comparison
equal
deleted
inserted
replaced
466:ee6d66462bff | 467:bbd6b0b4a2b1 |
---|---|
169 | 169 |
170 return total; | 170 return total; |
171 } | 171 } |
172 | 172 |
173 | 173 |
174 int ngx_win32_rename_file(ngx_str_t *from, ngx_str_t *to, ngx_pool_t *pool) | 174 ngx_int_t ngx_win32_rename_file(ngx_str_t *from, ngx_str_t *to, |
175 ngx_pool_t *pool) | |
175 { | 176 { |
176 int rc, collision; | 177 int rc, collision; |
177 u_int num; | 178 u_int num; |
178 u_char *name; | 179 u_char *name; |
179 | 180 |
227 } | 228 } |
228 | 229 |
229 | 230 |
230 #if 0 | 231 #if 0 |
231 | 232 |
232 int ngx_file_info(char *file, ngx_file_info_t *sb) | 233 ngx_int_t ngx_file_info(char *file, ngx_file_info_t *sb) |
233 { | 234 { |
234 WIN32_FILE_ATTRIBUTE_DATA fa; | 235 WIN32_FILE_ATTRIBUTE_DATA fa; |
235 | 236 |
236 /* NT4 and Win98 */ | 237 /* NT4 and Win98 */ |
237 | 238 |
250 } | 251 } |
251 | 252 |
252 #endif | 253 #endif |
253 | 254 |
254 | 255 |
255 int ngx_file_info(u_char *file, ngx_file_info_t *sb) | 256 ngx_int_t ngx_file_info(u_char *file, ngx_file_info_t *sb) |
256 { | 257 { |
257 /* Win95 */ | 258 /* Win95 */ |
258 | 259 |
259 sb->dwFileAttributes = GetFileAttributes((const char *) file); | 260 sb->dwFileAttributes = GetFileAttributes((const char *) file); |
260 | 261 |
264 | 265 |
265 return NGX_OK; | 266 return NGX_OK; |
266 } | 267 } |
267 | 268 |
268 | 269 |
269 int ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir) | 270 ngx_int_t ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir) |
270 { | 271 { |
271 ngx_cpystrn(name->data + name->len, NGX_DIR_MASK, NGX_DIR_MASK_LEN + 1); | 272 ngx_cpystrn(name->data + name->len, NGX_DIR_MASK, NGX_DIR_MASK_LEN + 1); |
272 | 273 |
273 dir->dir = FindFirstFile((const char *) name->data, &dir->fd); | 274 dir->dir = FindFirstFile((const char *) name->data, &dir->fd); |
274 | 275 |
281 | 282 |
282 return NGX_OK; | 283 return NGX_OK; |
283 } | 284 } |
284 | 285 |
285 | 286 |
286 int ngx_read_dir(ngx_dir_t *dir) | 287 ngx_int_t ngx_read_dir(ngx_dir_t *dir) |
287 { | 288 { |
288 if (dir->ready) { | 289 if (dir->ready) { |
289 dir->ready = 0; | 290 dir->ready = 0; |
290 return NGX_OK; | 291 return NGX_OK; |
291 } | 292 } |
296 | 297 |
297 return NGX_OK; | 298 return NGX_OK; |
298 } | 299 } |
299 | 300 |
300 | 301 |
301 int ngx_file_append_mode(ngx_fd_t fd) | 302 ngx_int_t ngx_file_append_mode(ngx_fd_t fd) |
302 { | 303 { |
304 #if 0 | |
305 if (LockFile(fd, 0, 0, 0xffffffff, 0xffffffff) == 0) { | |
306 return NGX_ERROR; | |
307 } | |
308 #endif | |
309 | |
303 if (SetFilePointer(fd, 0, NULL, FILE_END) == INVALID_SET_FILE_POINTER) { | 310 if (SetFilePointer(fd, 0, NULL, FILE_END) == INVALID_SET_FILE_POINTER) { |
304 if (ngx_errno != NO_ERROR) { | 311 if (ngx_errno != NO_ERROR) { |
305 return NGX_ERROR; | 312 return NGX_ERROR; |
306 } | 313 } |
307 } | 314 } |
308 | 315 |
316 #if 0 | |
317 if (UnlockFile(fd, 0, 0, 0xffffffff, 0xffffffff) == 0) { | |
318 return NGX_ERROR; | |
319 } | |
320 #endif | |
321 | |
309 return NGX_OK; | 322 return NGX_OK; |
310 } | 323 } |