comparison src/core/ngx_file.h @ 956:8c3d62474df1

ngx_walk_tree()
author Igor Sysoev <igor@sysoev.ru>
date Mon, 25 Dec 2006 12:38:00 +0000
parents 562806624c4a
children bb139aba3199
comparison
equal deleted inserted replaced
955:ff762576da78 956:8c3d62474df1
54 unsigned log_level:8; 54 unsigned log_level:8;
55 unsigned persistent:1; 55 unsigned persistent:1;
56 } ngx_temp_file_t; 56 } ngx_temp_file_t;
57 57
58 58
59 typedef struct ngx_tree_ctx_s ngx_tree_ctx_t;
60
61 typedef ngx_int_t (*ngx_tree_init_handler_pt) (ngx_tree_ctx_t *ctx,
62 ngx_tree_ctx_t *prev);
63 typedef ngx_int_t (*ngx_tree_handler_pt) (ngx_tree_ctx_t *ctx, ngx_str_t *name);
64
65 struct ngx_tree_ctx_s {
66 ngx_tree_init_handler_pt init_handler;
67 ngx_tree_handler_pt file_handler;
68 ngx_tree_handler_pt pre_tree_handler;
69 ngx_tree_handler_pt post_tree_handler;
70 ngx_tree_handler_pt spec_handler;
71 void *data;
72 size_t size;
73 ngx_log_t *log;
74 };
75
76
59 ssize_t ngx_write_chain_to_temp_file(ngx_temp_file_t *tf, ngx_chain_t *chain); 77 ssize_t ngx_write_chain_to_temp_file(ngx_temp_file_t *tf, ngx_chain_t *chain);
60 ngx_int_t ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path, 78 ngx_int_t ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path,
61 ngx_pool_t *pool, ngx_uint_t persistent,ngx_uint_t mode); 79 ngx_pool_t *pool, ngx_uint_t persistent,ngx_uint_t mode);
62 void ngx_create_hashed_filename(ngx_file_t *file, ngx_path_t *path); 80 void ngx_create_hashed_filename(ngx_file_t *file, ngx_path_t *path);
63 ngx_int_t ngx_create_path(ngx_file_t *file, ngx_path_t *path); 81 ngx_int_t ngx_create_path(ngx_file_t *file, ngx_path_t *path);
64 ngx_err_t ngx_create_full_path(u_char *dir, ngx_uint_t access); 82 ngx_err_t ngx_create_full_path(u_char *dir, ngx_uint_t access);
65 ngx_int_t ngx_add_path(ngx_conf_t *cf, ngx_path_t **slot); 83 ngx_int_t ngx_add_path(ngx_conf_t *cf, ngx_path_t **slot);
66 ngx_int_t ngx_create_pathes(ngx_cycle_t *cycle, ngx_uid_t user); 84 ngx_int_t ngx_create_pathes(ngx_cycle_t *cycle, ngx_uid_t user);
85 ngx_int_t ngx_walk_tree(ngx_tree_ctx_t *ctx, ngx_str_t *tree);
67 86
68 void ngx_init_temp_number(void); 87 void ngx_init_temp_number(void);
69 ngx_atomic_uint_t ngx_next_temp_number(ngx_uint_t collision); 88 ngx_atomic_uint_t ngx_next_temp_number(ngx_uint_t collision);
70 89
71 char *ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 90 char *ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);