Lines Matching refs:resource

321 	php_url *resource = NULL;  in phar_wrapper_open_dir()  local
331 if ((resource = phar_parse_url(wrapper, path, mode, options TSRMLS_CC)) == NULL) { in phar_wrapper_open_dir()
337 if (!resource->scheme || !resource->host || !resource->path) { in phar_wrapper_open_dir()
338 if (resource->host && !resource->path) { in phar_wrapper_open_dir()
339 …t least phar://%s/ for root directory (always use full path to a new phar)", path, resource->host); in phar_wrapper_open_dir()
340 php_url_free(resource); in phar_wrapper_open_dir()
343 php_url_free(resource); in phar_wrapper_open_dir()
348 if (strcasecmp("phar", resource->scheme)) { in phar_wrapper_open_dir()
349 php_url_free(resource); in phar_wrapper_open_dir()
354 host_len = strlen(resource->host); in phar_wrapper_open_dir()
356 internal_file = resource->path + 1; /* strip leading "/" */ in phar_wrapper_open_dir()
358 if (FAILURE == phar_get_archive(&phar, resource->host, host_len, NULL, 0, &error TSRMLS_CC)) { in phar_wrapper_open_dir()
363 …php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "phar file \"%s\" is unknown", resource->… in phar_wrapper_open_dir()
365 php_url_free(resource); in phar_wrapper_open_dir()
377 php_url_free(resource); in phar_wrapper_open_dir()
382 php_url_free(resource); in phar_wrapper_open_dir()
387 php_url_free(resource); in phar_wrapper_open_dir()
391 php_url_free(resource); in phar_wrapper_open_dir()
395 php_url_free(resource); in phar_wrapper_open_dir()
412 php_url_free(resource); in phar_wrapper_open_dir()
424 php_url_free(resource); in phar_wrapper_open_dir()
438 php_url *resource = NULL; in phar_wrapper_mkdir() local
459 if ((resource = phar_parse_url(wrapper, url_from, "w", options TSRMLS_CC)) == NULL) { in phar_wrapper_mkdir()
464 if (!resource->scheme || !resource->host || !resource->path) { in phar_wrapper_mkdir()
465 php_url_free(resource); in phar_wrapper_mkdir()
470 if (strcasecmp("phar", resource->scheme)) { in phar_wrapper_mkdir()
471 php_url_free(resource); in phar_wrapper_mkdir()
476 host_len = strlen(resource->host); in phar_wrapper_mkdir()
478 if (FAILURE == phar_get_archive(&phar, resource->host, host_len, NULL, 0, &error TSRMLS_CC)) { in phar_wrapper_mkdir()
479 …\"%s\" in phar \"%s\", error retrieving phar information: %s", resource->path+1, resource->host, e… in phar_wrapper_mkdir()
481 php_url_free(resource); in phar_wrapper_mkdir()
485 …if ((e = phar_get_entry_info_dir(phar, resource->path + 1, strlen(resource->path + 1), 2, &error, … in phar_wrapper_mkdir()
491 …eate directory \"%s\" in phar \"%s\", directory already exists", resource->path+1, resource->host); in phar_wrapper_mkdir()
492 php_url_free(resource); in phar_wrapper_mkdir()
497 …har error: cannot create directory \"%s\" in phar \"%s\", %s", resource->path+1, resource->host, e… in phar_wrapper_mkdir()
499 php_url_free(resource); in phar_wrapper_mkdir()
503 …if (phar_get_entry_info_dir(phar, resource->path + 1, strlen(resource->path + 1), 0, &error, 1 TSR… in phar_wrapper_mkdir()
505 …ot create directory \"%s\" in phar \"%s\", file already exists", resource->path+1, resource->host); in phar_wrapper_mkdir()
506 php_url_free(resource); in phar_wrapper_mkdir()
511 …har error: cannot create directory \"%s\" in phar \"%s\", %s", resource->path+1, resource->host, e… in phar_wrapper_mkdir()
513 php_url_free(resource); in phar_wrapper_mkdir()
524 entry.filename = estrdup(resource->path + 1); in phar_wrapper_mkdir()
531 entry.filename_len = strlen(resource->path + 1); in phar_wrapper_mkdir()
532 php_url_free(resource); in phar_wrapper_mkdir()
570 php_url *resource = NULL; in phar_wrapper_rmdir() local
596 if ((resource = phar_parse_url(wrapper, url, "w", options TSRMLS_CC)) == NULL) { in phar_wrapper_rmdir()
601 if (!resource->scheme || !resource->host || !resource->path) { in phar_wrapper_rmdir()
602 php_url_free(resource); in phar_wrapper_rmdir()
607 if (strcasecmp("phar", resource->scheme)) { in phar_wrapper_rmdir()
608 php_url_free(resource); in phar_wrapper_rmdir()
613 host_len = strlen(resource->host); in phar_wrapper_rmdir()
615 if (FAILURE == phar_get_archive(&phar, resource->host, host_len, NULL, 0, &error TSRMLS_CC)) { in phar_wrapper_rmdir()
616 …\"%s\" in phar \"%s\", error retrieving phar information: %s", resource->path+1, resource->host, e… in phar_wrapper_rmdir()
618 php_url_free(resource); in phar_wrapper_rmdir()
622 path_len = strlen(resource->path+1); in phar_wrapper_rmdir()
624 …if (!(entry = phar_get_entry_info_dir(phar, resource->path + 1, path_len, 2, &error, 1 TSRMLS_CC))… in phar_wrapper_rmdir()
626 …har error: cannot remove directory \"%s\" in phar \"%s\", %s", resource->path+1, resource->host, e… in phar_wrapper_rmdir()
629 …move directory \"%s\" in phar \"%s\", directory does not exist", resource->path+1, resource->host); in phar_wrapper_rmdir()
631 php_url_free(resource); in phar_wrapper_rmdir()
643 memcmp(str_key, resource->path+1, path_len) == 0 && in phar_wrapper_rmdir()
651 php_url_free(resource); in phar_wrapper_rmdir()
664 memcmp(str_key, resource->path+1, path_len) == 0 && in phar_wrapper_rmdir()
672 php_url_free(resource); in phar_wrapper_rmdir()
680 zend_hash_del(&phar->virtual_dirs, resource->path+1, path_len); in phar_wrapper_rmdir()
690 php_url_free(resource); in phar_wrapper_rmdir()
696 php_url_free(resource); in phar_wrapper_rmdir()