Lines Matching refs:dst

1903                       const buffer * const dst)  in webdav_prop_move_uri()  argument
1912 sqlite3_bind_text(stmt, 1, BUF_PTR_LEN(dst), SQLITE_STATIC); in webdav_prop_move_uri()
1928 UNUSED(dst); in webdav_prop_move_uri()
1938 const buffer * const dst) in webdav_prop_move_uri_col() argument
1951 sqlite3_bind_text(stmt, 1, BUF_PTR_LEN(dst), SQLITE_STATIC); in webdav_prop_move_uri_col()
1969 UNUSED(dst); in webdav_prop_move_uri_col()
2011 const buffer * const dst) in webdav_prop_copy_uri() argument
2020 sqlite3_bind_text(stmt, 1, BUF_PTR_LEN(dst), SQLITE_STATIC); in webdav_prop_copy_uri()
2035 UNUSED(dst); in webdav_prop_copy_uri()
2459 #define webdav_unlinkat(pconf,dst,dfd,d_name) webdav_delete_file((pconf),(dst)) argument
2463 const physical_st * const dst, in webdav_unlinkat() argument
2467 stat_cache_delete_entry(BUF_PTR_LEN(&dst->path)); in webdav_unlinkat()
2468 return webdav_prop_delete_uri(pconf, &dst->rel_path); in webdav_unlinkat()
2482 const physical_st * const dst) in webdav_delete_file() argument
2484 if (0 == unlink(dst->path.ptr)) { in webdav_delete_file()
2485 stat_cache_delete_entry(BUF_PTR_LEN(&dst->path)); in webdav_delete_file()
2486 return webdav_prop_delete_uri(pconf, &dst->rel_path); in webdav_delete_file()
2499 physical_st * const dst, in webdav_delete_dir() argument
2506 DIR * const dir = opendir(dst->path.ptr); in webdav_delete_dir()
2508 const int dfd = fdevent_open_dirname(dst->path.ptr, 0); in webdav_delete_dir()
2513 webdav_xml_response_status(r, &dst->rel_path, 403); in webdav_delete_dir()
2519 const uint32_t dst_path_used = dst->path.used; in webdav_delete_dir()
2520 const uint32_t dst_rel_path_used = dst->rel_path.used; in webdav_delete_dir()
2548 buffer_append_string_len(&dst->path, de->d_name, len); in webdav_delete_dir()
2549 buffer_append_string_len(&dst->rel_path, de->d_name, len); in webdav_delete_dir()
2557 if (0 != stat(dst->path.ptr, &st)) { in webdav_delete_dir()
2558 dst->path.ptr[ (dst->path.used = dst_path_used) -1]='\0'; in webdav_delete_dir()
2559 dst->rel_path.ptr[(dst->rel_path.used = dst_rel_path_used)-1]='\0'; in webdav_delete_dir()
2567 buffer_append_char(&dst->path, '/'); in webdav_delete_dir()
2568 buffer_append_char(&dst->rel_path, '/'); in webdav_delete_dir()
2569 multi_status |= webdav_delete_dir(pconf, dst, r, flags); in webdav_delete_dir()
2573 webdav_unlinkat(pconf, dst, dfd, de->d_name); in webdav_delete_dir()
2575 webdav_xml_response_status(r, &dst->rel_path, status); in webdav_delete_dir()
2580 dst->path.ptr[ (dst->path.used = dst_path_used) -1] = '\0'; in webdav_delete_dir()
2581 dst->rel_path.ptr[(dst->rel_path.used = dst_rel_path_used)-1] = '\0'; in webdav_delete_dir()
2587 if (0 == rmdir(dst->path.ptr)) in webdav_delete_dir()
2588 rmdir_status = webdav_prop_delete_uri(pconf, &dst->rel_path); in webdav_delete_dir()
2598 webdav_xml_response_status(r, &dst->rel_path, rmdir_status); in webdav_delete_dir()
2608 #define webdav_linktmp_rename(pconf, src, dst) -1 argument
2613 const buffer * const dst) in webdav_linktmp_rename() argument
2619 buffer_append_str2(tmpb, BUF_PTR_LEN(dst), in webdav_linktmp_rename()
2628 rc = rename(tmpb->ptr, dst->ptr); in webdav_linktmp_rename()
2650 const physical_st * const dst, in webdav_copytmp_rename() argument
2657 |WEBDAV_FLAG_NO_CLONE)) && src != dst) { in webdav_copytmp_rename()
2658 if (0==clonefile(src->path.ptr,dst->path.ptr,CLONE_NOFOLLOW)) in webdav_copytmp_rename()
2686 buffer_append_str2(tmpb, BUF_PTR_LEN(&dst->path), in webdav_copytmp_rename()
2844 if (src == dst && 0 == rc) { in webdav_copytmp_rename()
2865 if (src == dst) { in webdav_copytmp_rename()
2877 if (0 == lstat(dst->path.ptr, &stb) || errno != ENOENT) { in webdav_copytmp_rename()
2884 if (0 == rename(tmpb->ptr, dst->path.ptr)) in webdav_copytmp_rename()
2887 AT_FDCWD, dst->path.ptr, in webdav_copytmp_rename()
2893 stat_cache_delete_entry(BUF_PTR_LEN(&dst->path)); in webdav_copytmp_rename()
2913 const physical_st * const dst, in webdav_copymove_file() argument
2921 if (0 == lstat(dst->path.ptr, &st) || errno != ENOENT) in webdav_copymove_file()
2926 if (0 == rename(src->path.ptr, dst->path.ptr)) in webdav_copymove_file()
2929 AT_FDCWD, dst->path.ptr, in webdav_copymove_file()
2946 stat_cache_delete_entry(BUF_PTR_LEN(&dst->path)); in webdav_copymove_file()
2948 webdav_prop_move_uri(pconf, &src->rel_path, &dst->rel_path); in webdav_copymove_file()
2955 if (0 == linkat(AT_FDCWD, src->path.ptr, AT_FDCWD, dst->path.ptr, 0)){ in webdav_copymove_file()
2956 webdav_prop_copy_uri(pconf, &src->rel_path, &dst->rel_path); in webdav_copymove_file()
2962 if (0 == webdav_linktmp_rename(pconf, &src->path, &dst->path)) { in webdav_copymove_file()
2963 webdav_prop_copy_uri(pconf, &src->rel_path, &dst->rel_path); in webdav_copymove_file()
2974 int status = webdav_copytmp_rename(pconf, src, dst, flags); in webdav_copymove_file()
2976 webdav_prop_copy_uri(pconf, &src->rel_path, &dst->rel_path); in webdav_copymove_file()
2987 const physical_st * const dst, in webdav_mkdir() argument
2990 if (0 == mkdir(dst->path.ptr, WEBDAV_DIR_MODE)) { in webdav_mkdir()
2991 webdav_parent_modified(&dst->path); in webdav_mkdir()
3013 force_assert(2 <= dst->path.used); in webdav_mkdir()
3014 force_assert(2 <= dst->rel_path.used); in webdav_mkdir()
3019 dst->path.ptr[dst->path.used-2] = '\0'; /*(trailing slash)*/ in webdav_mkdir()
3020 status = lstat(dst->path.ptr, &st); in webdav_mkdir()
3021 dst->path.ptr[dst->path.used-2] = '/'; /*(restore slash)*/ in webdav_mkdir()
3031 dst->path.ptr[dst->path.used-2] = '\0'; /*(trailing slash)*/ in webdav_mkdir()
3032 dst->rel_path.ptr[dst->rel_path.used-2] = '\0'; in webdav_mkdir()
3033 status = webdav_delete_file(pconf, dst); in webdav_mkdir()
3034 dst->path.ptr[dst->path.used-2] = '/'; /*(restore slash)*/ in webdav_mkdir()
3035 dst->rel_path.ptr[dst->rel_path.used-2] = '/'; in webdav_mkdir()
3039 webdav_parent_modified(&dst->path); in webdav_mkdir()
3040 return (0 == mkdir(dst->path.ptr, WEBDAV_DIR_MODE)) in webdav_mkdir()
3049 physical_st * const dst, in webdav_copymove_dir() argument
3105 if (0 == lstat(dst->path.ptr, &st) || errno != ENOENT) { in webdav_copymove_dir()
3112 if (0 == rename(src->path.ptr, dst->path.ptr)) in webdav_copymove_dir()
3115 AT_FDCWD, dst->path.ptr, in webdav_copymove_dir()
3119 webdav_prop_move_uri_col(pconf, &src->rel_path, &dst->rel_path); in webdav_copymove_dir()
3141 force_assert(2 <= dst->path.used); in webdav_copymove_dir()
3144 dst->path.ptr[dst->path.used-2] = '\0'; /*(trailing slash)*/ in webdav_copymove_dir()
3145 status = lstat(dst->path.ptr, &st); in webdav_copymove_dir()
3146 dst->path.ptr[dst->path.used-2] = '/'; /*(restore slash)*/ in webdav_copymove_dir()
3154 force_assert(2 <= dst->rel_path.used); in webdav_copymove_dir()
3157 dst->path.ptr[dst->path.used-2] = '\0'; /*(remove slash)*/ in webdav_copymove_dir()
3158 dst->rel_path.ptr[dst->rel_path.used-2] = '\0'; in webdav_copymove_dir()
3159 status = webdav_delete_file(pconf, dst); in webdav_copymove_dir()
3160 dst->path.ptr[dst->path.used-2] = '/'; /*(restore slash)*/ in webdav_copymove_dir()
3161 dst->rel_path.ptr[dst->rel_path.used-2] = '/'; in webdav_copymove_dir()
3167 if (0 == rename(src->path.ptr, dst->path.ptr)) { in webdav_copymove_dir()
3169 &dst->rel_path); in webdav_copymove_dir()
3193 if (0 != (status = webdav_mkdir(pconf, dst, overwrite))) { in webdav_copymove_dir()
3199 webdav_prop_copy_uri(pconf, &src->rel_path, &dst->rel_path); in webdav_copymove_dir()
3207 const uint32_t dst_path_used = dst->path.used; in webdav_copymove_dir()
3208 const uint32_t dst_rel_path_used = dst->rel_path.used; in webdav_copymove_dir()
3249 buffer_append_string_len(&dst->path, de->d_name, len); in webdav_copymove_dir()
3251 buffer_append_string_len(&dst->rel_path, de->d_name, len); in webdav_copymove_dir()
3261 dst->path.ptr[ (dst->path.used = dst_path_used) -1]='\0'; in webdav_copymove_dir()
3262 dst->rel_path.ptr[(dst->rel_path.used = dst_rel_path_used)-1]='\0'; in webdav_copymove_dir()
3271 buffer_append_char(&dst->path, '/'); in webdav_copymove_dir()
3273 buffer_append_char(&dst->rel_path, '/'); in webdav_copymove_dir()
3274 status = webdav_copymove_dir(pconf, src, dst, r, flags); in webdav_copymove_dir()
3279 status = webdav_copymove_file(pconf, src, dst, &flags); in webdav_copymove_dir()
3297 dst->path.ptr[ (dst->path.used = dst_path_used) -1] = '\0'; in webdav_copymove_dir()
3298 dst->rel_path.ptr[(dst->rel_path.used = dst_rel_path_used)-1] = '\0'; in webdav_copymove_dir()
3324 physical_st * restrict dst; member
3497 stat_cache_mimetype_by_ext(mtypes, BUF_PTR_LEN(&pb->dst->path)); in webdav_propfind_live_props()
3598 : 0 == webdav_prop_select_prop(pb->pconf, &pb->dst->rel_path, in webdav_propfind_resource_props()
3622 webdav_prop_select_props(pb->pconf, &pb->dst->rel_path, pb->b_200); in webdav_propfind_resource_props()
3642 webdav_lock_activelocks(pb->pconf, &pb->dst->rel_path, in webdav_propfind_resource_props()
3671 webdav_prop_select_propnames(pb->pconf, &pb->dst->rel_path, pb->b_200); in webdav_propfind_resource_propnames()
3682 webdav_xml_href(b, &pb->dst->rel_path); in webdav_propfind_resource_403()
3724 webdav_xml_href(b, &pb->dst->rel_path); in webdav_propfind_resource()
3743 physical_st * const dst = pb->dst; in webdav_propfind_dir() local
3746 DIR * const dir = opendir(dst->path.ptr); in webdav_propfind_dir()
3748 const int dfd = fdevent_open_dirname(dst->path.ptr, 0); in webdav_propfind_dir()
3766 const uint32_t dst_path_used = dst->path.used; in webdav_propfind_dir()
3767 const uint32_t dst_rel_path_used = dst->rel_path.used; in webdav_propfind_dir()
3785 buffer_append_string_len(&dst->path, de->d_name, len); in webdav_propfind_dir()
3786 buffer_append_string_len(&dst->rel_path, de->d_name, len); in webdav_propfind_dir()
3788 if (0 != stat(dst->path.ptr, &pb->st)) { in webdav_propfind_dir()
3789 dst->path.ptr[ (dst->path.used = dst_path_used) -1]='\0'; in webdav_propfind_dir()
3790 dst->rel_path.ptr[(dst->rel_path.used = dst_rel_path_used)-1]='\0'; in webdav_propfind_dir()
3795 buffer_append_char(&dst->path, '/'); in webdav_propfind_dir()
3796 buffer_append_char(&dst->rel_path, '/'); in webdav_propfind_dir()
3804 dst->path.ptr[ (dst->path.used = dst_path_used) -1] = '\0'; in webdav_propfind_dir()
3805 dst->rel_path.ptr[(dst->rel_path.used = dst_rel_path_used)-1] = '\0'; in webdav_propfind_dir()
4365 pb.dst = &r->physical; in mod_webdav_propfind()
5038 …ebdav_copymove_b (request_st * const r, const plugin_config * const pconf, physical_st * const dst) in mod_webdav_copymove_b() argument
5040 buffer * const dst_path = &dst->path; in mod_webdav_copymove_b()
5041 buffer * const dst_rel_path = &dst->rel_path; in mod_webdav_copymove_b()
5261 status = webdav_mkdir(pconf, dst, 1); in mod_webdav_copymove_b()
5268 status = webdav_mkdir(pconf, dst, in mod_webdav_copymove_b()
5284 if (0 == webdav_copymove_dir(pconf, &r->physical, dst, r, flags)) { in mod_webdav_copymove_b()
5383 rc = webdav_copymove_file(pconf, &r->physical, dst, &flags); in mod_webdav_copymove_b()
5401 physical_st dst; in mod_webdav_copymove() local
5402 dst.path = *dst_path; in mod_webdav_copymove()
5403 dst.rel_path = *dst_rel_path; in mod_webdav_copymove()
5404 handler_t rc = mod_webdav_copymove_b(r, pconf, &dst); in mod_webdav_copymove()
5405 *dst_path = dst.path; in mod_webdav_copymove()
5406 *dst_rel_path = dst.rel_path; in mod_webdav_copymove()