Lines Matching refs:resource

304 	php_url *resource = NULL;  in phar_wrapper_open_dir()  local
313 if ((resource = phar_parse_url(wrapper, path, mode, options TSRMLS_CC)) == NULL) { in phar_wrapper_open_dir()
319 if (!resource->scheme || !resource->host || !resource->path) { in phar_wrapper_open_dir()
320 if (resource->host && !resource->path) { in phar_wrapper_open_dir()
321 …t least phar://%s/ for root directory (always use full path to a new phar)", path, resource->host); in phar_wrapper_open_dir()
322 php_url_free(resource); in phar_wrapper_open_dir()
325 php_url_free(resource); in phar_wrapper_open_dir()
330 if (strcasecmp("phar", resource->scheme)) { in phar_wrapper_open_dir()
331 php_url_free(resource); in phar_wrapper_open_dir()
336 host_len = strlen(resource->host); in phar_wrapper_open_dir()
338 internal_file = resource->path + 1; /* strip leading "/" */ in phar_wrapper_open_dir()
340 if (FAILURE == phar_get_archive(&phar, resource->host, host_len, NULL, 0, &error TSRMLS_CC)) { in phar_wrapper_open_dir()
345 …php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "phar file \"%s\" is unknown", resource->… in phar_wrapper_open_dir()
347 php_url_free(resource); in phar_wrapper_open_dir()
359 php_url_free(resource); in phar_wrapper_open_dir()
364 php_url_free(resource); in phar_wrapper_open_dir()
369 php_url_free(resource); in phar_wrapper_open_dir()
373 php_url_free(resource); in phar_wrapper_open_dir()
377 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 TSRMLS_CC)) == 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 TSRMLS_CC)) { 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 TSR… 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
574 if ((resource = phar_parse_url(wrapper, url, "w", options TSRMLS_CC)) == NULL) { in phar_wrapper_rmdir()
579 if (!resource->scheme || !resource->host || !resource->path) { in phar_wrapper_rmdir()
580 php_url_free(resource); in phar_wrapper_rmdir()
585 if (strcasecmp("phar", resource->scheme)) { in phar_wrapper_rmdir()
586 php_url_free(resource); in phar_wrapper_rmdir()
591 host_len = strlen(resource->host); in phar_wrapper_rmdir()
593 if (FAILURE == phar_get_archive(&phar, resource->host, host_len, NULL, 0, &error TSRMLS_CC)) { in phar_wrapper_rmdir()
594 …\"%s\" in phar \"%s\", error retrieving phar information: %s", resource->path+1, resource->host, e… in phar_wrapper_rmdir()
596 php_url_free(resource); in phar_wrapper_rmdir()
600 path_len = strlen(resource->path+1); in phar_wrapper_rmdir()
602 …if (!(entry = phar_get_entry_info_dir(phar, resource->path + 1, path_len, 2, &error, 1 TSRMLS_CC))… in phar_wrapper_rmdir()
604 …har error: cannot remove directory \"%s\" in phar \"%s\", %s", resource->path+1, resource->host, e… in phar_wrapper_rmdir()
607 …move directory \"%s\" in phar \"%s\", directory does not exist", resource->path+1, resource->host); in phar_wrapper_rmdir()
609 php_url_free(resource); in phar_wrapper_rmdir()
619 memcmp(str_key, resource->path+1, path_len) == 0 && in phar_wrapper_rmdir()
626 php_url_free(resource); in phar_wrapper_rmdir()
636 memcmp(str_key, resource->path+1, path_len) == 0 && in phar_wrapper_rmdir()
643 php_url_free(resource); in phar_wrapper_rmdir()
650 zend_hash_del(&phar->virtual_dirs, resource->path+1, path_len); in phar_wrapper_rmdir()
660 php_url_free(resource); in phar_wrapper_rmdir()
666 php_url_free(resource); in phar_wrapper_rmdir()