Lines Matching refs:internal_file

165 	char *internal_file;  in phar_wrapper_open_url()  local
194 internal_file = estrndup(ZSTR_VAL(resource->path) + 1, ZSTR_LEN(resource->path) - 1); in phar_wrapper_open_url()
196 …t_or_create_entry_data(ZSTR_VAL(resource->host), host_len, internal_file, strlen(internal_file), m… in phar_wrapper_open_url()
201 …tions, "phar error: file \"%s\" could not be created in phar \"%s\"", internal_file, ZSTR_VAL(reso… in phar_wrapper_open_url()
203 efree(internal_file); in phar_wrapper_open_url()
212 efree(internal_file); in phar_wrapper_open_url()
216 if (idata->internal_file->uncompressed_filesize == 0 in phar_wrapper_open_url()
217 && idata->internal_file->compressed_filesize == 0 in phar_wrapper_open_url()
222 idata->internal_file->flags &= ~PHAR_ENT_COMPRESSION_MASK; in phar_wrapper_open_url()
223 idata->internal_file->flags |= Z_LVAL_P(pzoption); in phar_wrapper_open_url()
226 …phar_metadata_tracker_free(&idata->internal_file->metadata_tracker, idata->internal_file->is_persi… in phar_wrapper_open_url()
229 ZVAL_COPY_DEREF(&idata->internal_file->metadata_tracker.val, metadata); in phar_wrapper_open_url()
234 …*opened_path = strpprintf(MAXPATHLEN, "phar://%s/%s", idata->phar->fname, idata->internal_file->fi… in phar_wrapper_open_url()
238 if (!*internal_file && (options & STREAM_OPEN_FOR_INCLUDE)) { in phar_wrapper_open_url()
242 efree(internal_file); in phar_wrapper_open_url()
250 efree(internal_file); in phar_wrapper_open_url()
271 idata->internal_file = entry; in phar_wrapper_open_url()
280 efree(internal_file); in phar_wrapper_open_url()
285 …get_entry_data(&idata, ZSTR_VAL(resource->host), host_len, internal_file, strlen(internal_file), "… in phar_wrapper_open_url()
291 …(wrapper, options, "phar error: \"%s\" is not a file in phar \"%s\"", internal_file, ZSTR_VAL(reso… in phar_wrapper_open_url()
293 efree(internal_file); in phar_wrapper_open_url()
301 fprintf(stderr, "Filename: %s\n", internal_file); in phar_wrapper_open_url()
302 fprintf(stderr, "Entry: %s\n", idata->internal_file->filename); in phar_wrapper_open_url()
303 fprintf(stderr, "Size: %u\n", idata->internal_file->uncompressed_filesize); in phar_wrapper_open_url()
304 fprintf(stderr, "Compressed: %u\n", idata->internal_file->flags); in phar_wrapper_open_url()
305 fprintf(stderr, "Offset: %u\n", idata->internal_file->offset_within_phar); in phar_wrapper_open_url()
306 fprintf(stderr, "Cached: %s\n", idata->internal_file->filedata ? "yes" : "no"); in phar_wrapper_open_url()
310 …if (!idata->internal_file->is_crc_checked && phar_postprocess_file(idata, idata->internal_file->cr… in phar_wrapper_open_url()
314 efree(internal_file); in phar_wrapper_open_url()
319 char *entry = idata->internal_file->filename, *cwd; in phar_wrapper_open_url()
322 …idata->phar->is_zip) && idata->internal_file->filename_len == sizeof(".phar/stub.php")-1 && !strnc… in phar_wrapper_open_url()
335 …*opened_path = strpprintf(MAXPATHLEN, "phar://%s/%s", idata->phar->fname, idata->internal_file->fi… in phar_wrapper_open_url()
337 efree(internal_file); in phar_wrapper_open_url()
367 if (data->internal_file->link) { in phar_stream_read()
368 entry = phar_get_link_source(data->internal_file); in phar_stream_read()
370 entry = data->internal_file; in phar_stream_read()
399 if (data->internal_file->link) { in phar_stream_seek()
400 entry = phar_get_link_source(data->internal_file); in phar_stream_seek()
402 entry = data->internal_file; in phar_stream_seek()
442 …not write %d characters to \"%s\" in phar \"%s\"", (int) count, data->internal_file->filename, dat… in phar_stream_write()
446 if (data->position > (zend_off_t)data->internal_file->uncompressed_filesize) { in phar_stream_write()
447 data->internal_file->uncompressed_filesize = data->position; in phar_stream_write()
449 data->internal_file->compressed_filesize = data->internal_file->uncompressed_filesize; in phar_stream_write()
450 data->internal_file->old_flags = data->internal_file->flags; in phar_stream_write()
451 data->internal_file->is_modified = 1; in phar_stream_write()
465 if (data->internal_file->is_modified) { in phar_stream_flush()
466 data->internal_file->timestamp = time(0); in phar_stream_flush()
542 phar_dostat(data->phar, data->internal_file, ssb, 0); in phar_stream_stat()
554 char *internal_file, *error; in phar_wrapper_stat() local
578 internal_file = ZSTR_VAL(resource->path) + 1; /* strip leading "/" */ in phar_wrapper_stat()
590 if (*internal_file == '\0') { in phar_wrapper_stat()
600 internal_file_len = strlen(internal_file); in phar_wrapper_stat()
602 if (NULL != (entry = zend_hash_str_find_ptr(&phar->manifest, internal_file, internal_file_len))) { in phar_wrapper_stat()
607 if (zend_hash_str_exists(&(phar->virtual_dirs), internal_file, internal_file_len)) { in phar_wrapper_stat()
617 …if (ZSTR_LEN(str_key) >= internal_file_len || strncmp(ZSTR_VAL(str_key), internal_file, ZSTR_LEN(s… in phar_wrapper_stat()
630 test_len = spprintf(&test, MAXPATHLEN, "%s%s", entry->tmp, internal_file + ZSTR_LEN(str_key)); in phar_wrapper_stat()
636 if (SUCCESS != phar_mount_entry(phar, test, test_len, internal_file, internal_file_len)) { in phar_wrapper_stat()
641 … if (NULL == (entry = zend_hash_str_find_ptr(&phar->manifest, internal_file, internal_file_len))) { in phar_wrapper_stat()
662 char *internal_file, *error; in phar_wrapper_unlink() local
697 internal_file = estrndup(ZSTR_VAL(resource->path) + 1, ZSTR_LEN(resource->path) - 1); in phar_wrapper_unlink()
699 …if (FAILURE == phar_get_entry_data(&idata, ZSTR_VAL(resource->host), host_len, internal_file, inte… in phar_wrapper_unlink()
707 efree(internal_file); in phar_wrapper_unlink()
714 if (idata->internal_file->fp_refcount > 1) { in phar_wrapper_unlink()
716 …error: \"%s\" in phar \"%s\", has open file pointers, cannot unlink", internal_file, ZSTR_VAL(reso… in phar_wrapper_unlink()
717 efree(internal_file); in phar_wrapper_unlink()
723 efree(internal_file); in phar_wrapper_unlink()