Lines Matching refs:resource

305 	php_url *resource = NULL;  in phar_wrapper_open_dir()  local
314 if ((resource = phar_parse_url(wrapper, path, mode, options)) == NULL) { in phar_wrapper_open_dir()
320 if (!resource->scheme || !resource->host || !resource->path) { in phar_wrapper_open_dir()
321 if (resource->host && !resource->path) { in phar_wrapper_open_dir()
322 …t least phar://%s/ for root directory (always use full path to a new phar)", path, resource->host); in phar_wrapper_open_dir()
323 php_url_free(resource); in phar_wrapper_open_dir()
326 php_url_free(resource); in phar_wrapper_open_dir()
331 if (strcasecmp("phar", resource->scheme)) { in phar_wrapper_open_dir()
332 php_url_free(resource); in phar_wrapper_open_dir()
337 host_len = strlen(resource->host); in phar_wrapper_open_dir()
339 internal_file = resource->path + 1; /* strip leading "/" */ in phar_wrapper_open_dir()
341 if (FAILURE == phar_get_archive(&phar, resource->host, host_len, NULL, 0, &error)) { in phar_wrapper_open_dir()
346 php_stream_wrapper_log_error(wrapper, options, "phar file \"%s\" is unknown", resource->host); in phar_wrapper_open_dir()
348 php_url_free(resource); in phar_wrapper_open_dir()
360 php_url_free(resource); in phar_wrapper_open_dir()
365 php_url_free(resource); in phar_wrapper_open_dir()
370 php_url_free(resource); in phar_wrapper_open_dir()
374 php_url_free(resource); in phar_wrapper_open_dir()
378 php_url_free(resource); in phar_wrapper_open_dir()
392 php_url_free(resource); in phar_wrapper_open_dir()
403 php_url_free(resource); in phar_wrapper_open_dir()
417 php_url *resource = NULL; in phar_wrapper_mkdir() local
438 if ((resource = phar_parse_url(wrapper, url_from, "w", options)) == NULL) { in phar_wrapper_mkdir()
443 if (!resource->scheme || !resource->host || !resource->path) { in phar_wrapper_mkdir()
444 php_url_free(resource); in phar_wrapper_mkdir()
449 if (strcasecmp("phar", resource->scheme)) { in phar_wrapper_mkdir()
450 php_url_free(resource); in phar_wrapper_mkdir()
455 host_len = strlen(resource->host); in phar_wrapper_mkdir()
457 if (FAILURE == phar_get_archive(&phar, resource->host, host_len, NULL, 0, &error)) { in phar_wrapper_mkdir()
458 …\"%s\" in phar \"%s\", error retrieving phar information: %s", resource->path+1, resource->host, e… in phar_wrapper_mkdir()
460 php_url_free(resource); in phar_wrapper_mkdir()
464 …if ((e = phar_get_entry_info_dir(phar, resource->path + 1, strlen(resource->path + 1), 2, &error, … in phar_wrapper_mkdir()
470 …eate directory \"%s\" in phar \"%s\", directory already exists", resource->path+1, resource->host); in phar_wrapper_mkdir()
471 php_url_free(resource); in phar_wrapper_mkdir()
476 …har error: cannot create directory \"%s\" in phar \"%s\", %s", resource->path+1, resource->host, e… in phar_wrapper_mkdir()
478 php_url_free(resource); in phar_wrapper_mkdir()
482 if (phar_get_entry_info_dir(phar, resource->path + 1, strlen(resource->path + 1), 0, &error, 1)) { in phar_wrapper_mkdir()
484 …ot create directory \"%s\" in phar \"%s\", file already exists", resource->path+1, resource->host); in phar_wrapper_mkdir()
485 php_url_free(resource); in phar_wrapper_mkdir()
490 …har error: cannot create directory \"%s\" in phar \"%s\", %s", resource->path+1, resource->host, e… in phar_wrapper_mkdir()
492 php_url_free(resource); in phar_wrapper_mkdir()
503 entry.filename = estrdup(resource->path + 1); in phar_wrapper_mkdir()
510 entry.filename_len = strlen(resource->path + 1); in phar_wrapper_mkdir()
511 php_url_free(resource); in phar_wrapper_mkdir()
549 php_url *resource = NULL; in phar_wrapper_rmdir() local
573 if ((resource = phar_parse_url(wrapper, url, "w", options)) == NULL) { in phar_wrapper_rmdir()
578 if (!resource->scheme || !resource->host || !resource->path) { in phar_wrapper_rmdir()
579 php_url_free(resource); in phar_wrapper_rmdir()
584 if (strcasecmp("phar", resource->scheme)) { in phar_wrapper_rmdir()
585 php_url_free(resource); in phar_wrapper_rmdir()
590 host_len = strlen(resource->host); in phar_wrapper_rmdir()
592 if (FAILURE == phar_get_archive(&phar, resource->host, host_len, NULL, 0, &error)) { in phar_wrapper_rmdir()
593 …\"%s\" in phar \"%s\", error retrieving phar information: %s", resource->path+1, resource->host, e… in phar_wrapper_rmdir()
595 php_url_free(resource); in phar_wrapper_rmdir()
599 path_len = strlen(resource->path+1); in phar_wrapper_rmdir()
601 if (!(entry = phar_get_entry_info_dir(phar, resource->path + 1, path_len, 2, &error, 1))) { in phar_wrapper_rmdir()
603 …har error: cannot remove directory \"%s\" in phar \"%s\", %s", resource->path+1, resource->host, e… in phar_wrapper_rmdir()
606 …move directory \"%s\" in phar \"%s\", directory does not exist", resource->path+1, resource->host); in phar_wrapper_rmdir()
608 php_url_free(resource); in phar_wrapper_rmdir()
618 memcmp(ZSTR_VAL(str_key), resource->path+1, path_len) == 0 && in phar_wrapper_rmdir()
625 php_url_free(resource); in phar_wrapper_rmdir()
635 memcmp(ZSTR_VAL(str_key), resource->path+1, path_len) == 0 && in phar_wrapper_rmdir()
642 php_url_free(resource); in phar_wrapper_rmdir()
649 zend_hash_str_del(&phar->virtual_dirs, resource->path+1, path_len); in phar_wrapper_rmdir()
659 php_url_free(resource); in phar_wrapper_rmdir()
665 php_url_free(resource); in phar_wrapper_rmdir()