Lines Matching refs:resource

254 	php_url *resource = NULL;  in phar_wrapper_open_dir()  local
258 if ((resource = phar_parse_url(wrapper, path, mode, options)) == NULL) { in phar_wrapper_open_dir()
264 if (!resource->scheme || !resource->host || !resource->path) { in phar_wrapper_open_dir()
265 if (resource->host && !resource->path) { in phar_wrapper_open_dir()
266 …ar://%s/ for root directory (always use full path to a new phar)", path, ZSTR_VAL(resource->host)); in phar_wrapper_open_dir()
267 php_url_free(resource); in phar_wrapper_open_dir()
270 php_url_free(resource); in phar_wrapper_open_dir()
275 if (!zend_string_equals_literal_ci(resource->scheme, "phar")) { in phar_wrapper_open_dir()
276 php_url_free(resource); in phar_wrapper_open_dir()
283 …if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(resource->host), ZSTR_LEN(resource->host), NULL, 0… in phar_wrapper_open_dir()
288 …php_stream_wrapper_log_error(wrapper, options, "phar file \"%s\" is unknown", ZSTR_VAL(resource->h… in phar_wrapper_open_dir()
290 php_url_free(resource); in phar_wrapper_open_dir()
298 if (zend_string_equals(resource->path, ZSTR_CHAR('/'))) { in phar_wrapper_open_dir()
300 php_url_free(resource); in phar_wrapper_open_dir()
305 php_url_free(resource); in phar_wrapper_open_dir()
309 const char *internal_file = ZSTR_VAL(resource->path) + 1; /* strip leading "/" */ in phar_wrapper_open_dir()
310 size_t internal_file_len = ZSTR_LEN(resource->path) - 1; in phar_wrapper_open_dir()
315 php_url_free(resource); in phar_wrapper_open_dir()
320 php_url_free(resource); in phar_wrapper_open_dir()
324 php_url_free(resource); in phar_wrapper_open_dir()
334 php_url_free(resource); in phar_wrapper_open_dir()
340 php_url_free(resource); in phar_wrapper_open_dir()
354 php_url *resource = NULL; in phar_wrapper_mkdir() local
374 if ((resource = phar_parse_url(wrapper, url_from, "w", options)) == NULL) { in phar_wrapper_mkdir()
379 if (!resource->scheme || !resource->host || !resource->path) { in phar_wrapper_mkdir()
380 php_url_free(resource); in phar_wrapper_mkdir()
385 if (!zend_string_equals_literal_ci(resource->scheme, "phar")) { in phar_wrapper_mkdir()
386 php_url_free(resource); in phar_wrapper_mkdir()
391 …if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(resource->host), ZSTR_LEN(resource->host), NULL, 0… in phar_wrapper_mkdir()
392 …\"%s\", error retrieving phar information: %s", ZSTR_VAL(resource->path) + 1, ZSTR_VAL(resource->h… in phar_wrapper_mkdir()
394 php_url_free(resource); in phar_wrapper_mkdir()
398 …if ((e = phar_get_entry_info_dir(phar, ZSTR_VAL(resource->path) + 1, ZSTR_LEN(resource->path) - 1,… in phar_wrapper_mkdir()
404 …"%s\" in phar \"%s\", directory already exists", ZSTR_VAL(resource->path)+1, ZSTR_VAL(resource->ho… in phar_wrapper_mkdir()
405 php_url_free(resource); in phar_wrapper_mkdir()
410 …not create directory \"%s\" in phar \"%s\", %s", ZSTR_VAL(resource->path)+1, ZSTR_VAL(resource->ho… in phar_wrapper_mkdir()
412 php_url_free(resource); in phar_wrapper_mkdir()
416 …if (phar_get_entry_info_dir(phar, ZSTR_VAL(resource->path) + 1, ZSTR_LEN(resource->path) - 1, 0, &… in phar_wrapper_mkdir()
418 …ory \"%s\" in phar \"%s\", file already exists", ZSTR_VAL(resource->path)+1, ZSTR_VAL(resource->ho… in phar_wrapper_mkdir()
419 php_url_free(resource); in phar_wrapper_mkdir()
424 …not create directory \"%s\" in phar \"%s\", %s", ZSTR_VAL(resource->path)+1, ZSTR_VAL(resource->ho… in phar_wrapper_mkdir()
426 php_url_free(resource); in phar_wrapper_mkdir()
437 entry.filename = estrdup(ZSTR_VAL(resource->path) + 1); in phar_wrapper_mkdir()
444 entry.filename_len = ZSTR_LEN(resource->path) - 1; in phar_wrapper_mkdir()
445 php_url_free(resource); in phar_wrapper_mkdir()
483 php_url *resource = NULL; in phar_wrapper_rmdir() local
503 if ((resource = phar_parse_url(wrapper, url, "w", options)) == NULL) { in phar_wrapper_rmdir()
508 if (!resource->scheme || !resource->host || !resource->path) { in phar_wrapper_rmdir()
509 php_url_free(resource); in phar_wrapper_rmdir()
514 if (!zend_string_equals_literal_ci(resource->scheme, "phar")) { in phar_wrapper_rmdir()
515 php_url_free(resource); in phar_wrapper_rmdir()
520 …if (FAILURE == phar_get_archive(&phar, ZSTR_VAL(resource->host), ZSTR_LEN(resource->host), NULL, 0… in phar_wrapper_rmdir()
521 … \"%s\", error retrieving phar information: %s", ZSTR_VAL(resource->path)+1, ZSTR_VAL(resource->ho… in phar_wrapper_rmdir()
523 php_url_free(resource); in phar_wrapper_rmdir()
527 size_t path_len = ZSTR_LEN(resource->path) - 1; in phar_wrapper_rmdir()
529 …if (!(entry = phar_get_entry_info_dir(phar, ZSTR_VAL(resource->path) + 1, path_len, 2, &error, 1))… in phar_wrapper_rmdir()
531 …not remove directory \"%s\" in phar \"%s\", %s", ZSTR_VAL(resource->path)+1, ZSTR_VAL(resource->ho… in phar_wrapper_rmdir()
534 …"%s\" in phar \"%s\", directory does not exist", ZSTR_VAL(resource->path)+1, ZSTR_VAL(resource->ho… in phar_wrapper_rmdir()
536 php_url_free(resource); in phar_wrapper_rmdir()
545 zend_string_starts_with_cstr(str_key, ZSTR_VAL(resource->path)+1, path_len) in phar_wrapper_rmdir()
553 php_url_free(resource); in phar_wrapper_rmdir()
561 zend_string_starts_with_cstr(str_key, ZSTR_VAL(resource->path)+1, path_len) in phar_wrapper_rmdir()
569 php_url_free(resource); in phar_wrapper_rmdir()
576 zend_hash_str_del(&phar->virtual_dirs, ZSTR_VAL(resource->path)+1, path_len); in phar_wrapper_rmdir()
586 php_url_free(resource); in phar_wrapper_rmdir()
592 php_url_free(resource); in phar_wrapper_rmdir()