Lines Matching refs:internal_file
162 char *internal_file; in phar_wrapper_open_url() local
191 internal_file = estrdup(resource->path + 1); in phar_wrapper_open_url()
193 … = phar_get_or_create_entry_data(resource->host, host_len, internal_file, strlen(internal_file), m… in phar_wrapper_open_url()
198 …LS_CC, "phar error: file \"%s\" could not be created in phar \"%s\"", internal_file, resource->hos… in phar_wrapper_open_url()
200 efree(internal_file); in phar_wrapper_open_url()
209 efree(internal_file); in phar_wrapper_open_url()
213 if (idata->internal_file->uncompressed_filesize == 0 in phar_wrapper_open_url()
214 && idata->internal_file->compressed_filesize == 0 in phar_wrapper_open_url()
219 idata->internal_file->flags &= ~PHAR_ENT_COMPRESSION_MASK; in phar_wrapper_open_url()
220 idata->internal_file->flags |= Z_LVAL_PP(pzoption); in phar_wrapper_open_url()
223 if (idata->internal_file->metadata) { in phar_wrapper_open_url()
224 zval_ptr_dtor(&idata->internal_file->metadata); in phar_wrapper_open_url()
225 idata->internal_file->metadata = NULL; in phar_wrapper_open_url()
228 MAKE_STD_ZVAL(idata->internal_file->metadata); in phar_wrapper_open_url()
230 ZVAL_ZVAL(idata->internal_file->metadata, metadata, 1, 0); in phar_wrapper_open_url()
235 …spprintf(opened_path, MAXPATHLEN, "phar://%s/%s", idata->phar->fname, idata->internal_file->filena… in phar_wrapper_open_url()
239 if (!*internal_file && (options & STREAM_OPEN_FOR_INCLUDE)) { in phar_wrapper_open_url()
243 efree(internal_file); in phar_wrapper_open_url()
251 efree(internal_file); in phar_wrapper_open_url()
272 idata->internal_file = entry; in phar_wrapper_open_url()
281 efree(internal_file); in phar_wrapper_open_url()
286 …E == phar_get_entry_data(&idata, resource->host, host_len, internal_file, strlen(internal_file), "… in phar_wrapper_open_url()
292 …options TSRMLS_CC, "phar error: \"%s\" is not a file in phar \"%s\"", internal_file, resource->hos… in phar_wrapper_open_url()
294 efree(internal_file); in phar_wrapper_open_url()
302 fprintf(stderr, "Filename: %s\n", internal_file); in phar_wrapper_open_url()
303 fprintf(stderr, "Entry: %s\n", idata->internal_file->filename); in phar_wrapper_open_url()
304 fprintf(stderr, "Size: %u\n", idata->internal_file->uncompressed_filesize); in phar_wrapper_open_url()
305 fprintf(stderr, "Compressed: %u\n", idata->internal_file->flags); in phar_wrapper_open_url()
306 fprintf(stderr, "Offset: %u\n", idata->internal_file->offset_within_phar); in phar_wrapper_open_url()
307 fprintf(stderr, "Cached: %s\n", idata->internal_file->filedata ? "yes" : "no"); in phar_wrapper_open_url()
311 …if (!idata->internal_file->is_crc_checked && phar_postprocess_file(idata, idata->internal_file->cr… in phar_wrapper_open_url()
315 efree(internal_file); in phar_wrapper_open_url()
320 char *entry = idata->internal_file->filename, *cwd; in phar_wrapper_open_url()
323 …idata->phar->is_zip) && idata->internal_file->filename_len == sizeof(".phar/stub.php")-1 && !strnc… in phar_wrapper_open_url()
336 …spprintf(opened_path, MAXPATHLEN, "phar://%s/%s", idata->phar->fname, idata->internal_file->filena… in phar_wrapper_open_url()
338 efree(internal_file); in phar_wrapper_open_url()
365 if (data->internal_file->link) { in phar_stream_read()
366 entry = phar_get_link_source(data->internal_file TSRMLS_CC); in phar_stream_read()
368 entry = data->internal_file; in phar_stream_read()
397 if (data->internal_file->link) { in phar_stream_seek()
398 entry = phar_get_link_source(data->internal_file TSRMLS_CC); in phar_stream_seek()
400 entry = data->internal_file; in phar_stream_seek()
440 …not write %d characters to \"%s\" in phar \"%s\"", (int) count, data->internal_file->filename, dat… in phar_stream_write()
444 if (data->position > (off_t)data->internal_file->uncompressed_filesize) { in phar_stream_write()
445 data->internal_file->uncompressed_filesize = data->position; in phar_stream_write()
447 data->internal_file->compressed_filesize = data->internal_file->uncompressed_filesize; in phar_stream_write()
448 data->internal_file->old_flags = data->internal_file->flags; in phar_stream_write()
449 data->internal_file->is_modified = 1; in phar_stream_write()
463 if (data->internal_file->is_modified) { in phar_stream_flush()
464 data->internal_file->timestamp = time(0); in phar_stream_flush()
558 phar_dostat(data->phar, data->internal_file, ssb, 0 TSRMLS_CC); in phar_stream_stat()
570 char *internal_file, *error; in phar_wrapper_stat() local
594 internal_file = resource->path + 1; /* strip leading "/" */ in phar_wrapper_stat()
606 if (*internal_file == '\0') { in phar_wrapper_stat()
616 internal_file_len = strlen(internal_file); in phar_wrapper_stat()
618 if (SUCCESS == zend_hash_find(&phar->manifest, internal_file, internal_file_len, (void**)&entry)) { in phar_wrapper_stat()
623 if (zend_hash_exists(&(phar->virtual_dirs), internal_file, internal_file_len)) { in phar_wrapper_stat()
642 if ((int)keylen >= internal_file_len || strncmp(str_key, internal_file, keylen)) { in phar_wrapper_stat()
659 test_len = spprintf(&test, MAXPATHLEN, "%s%s", entry->tmp, internal_file + keylen); in phar_wrapper_stat()
666 …if (SUCCESS != phar_mount_entry(phar, test, test_len, internal_file, internal_file_len TSRMLS_CC))… in phar_wrapper_stat()
671 …if (SUCCESS != zend_hash_find(&phar->manifest, internal_file, internal_file_len, (void**)&entry)) { in phar_wrapper_stat()
692 char *internal_file, *error; in phar_wrapper_unlink() local
729 internal_file = estrdup(resource->path + 1); in phar_wrapper_unlink()
730 internal_file_len = strlen(internal_file); in phar_wrapper_unlink()
731 …if (FAILURE == phar_get_entry_data(&idata, resource->host, host_len, internal_file, internal_file_… in phar_wrapper_unlink()
739 efree(internal_file); in phar_wrapper_unlink()
746 if (idata->internal_file->fp_refcount > 1) { in phar_wrapper_unlink()
748 …error: \"%s\" in phar \"%s\", has open file pointers, cannot unlink", internal_file, resource->hos… in phar_wrapper_unlink()
749 efree(internal_file); in phar_wrapper_unlink()
755 efree(internal_file); in phar_wrapper_unlink()