Lines Matching refs:data

361 	phar_entry_data *data = (phar_entry_data *)stream->abstract;  in phar_stream_read()  local
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()
377 php_stream_seek(data->fp, data->position + data->zero, SEEK_SET); in phar_stream_read()
379 got = php_stream_read(data->fp, buf, MIN(count, entry->uncompressed_filesize - data->position)); in phar_stream_read()
380 data->position = php_stream_tell(data->fp) - data->zero; in phar_stream_read()
381 stream->eof = (data->position == (off_t) entry->uncompressed_filesize); in phar_stream_read()
392 phar_entry_data *data = (phar_entry_data *)stream->abstract; in phar_stream_seek() local
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()
405 temp = data->zero + entry->uncompressed_filesize + offset; in phar_stream_seek()
408 temp = data->zero + data->position + offset; in phar_stream_seek()
411 temp = data->zero + offset; in phar_stream_seek()
416 if (temp > data->zero + (off_t) entry->uncompressed_filesize) { in phar_stream_seek()
420 if (temp < data->zero) { in phar_stream_seek()
424 res = php_stream_seek(data->fp, temp, SEEK_SET); in phar_stream_seek()
425 *newoffset = php_stream_tell(data->fp) - data->zero; in phar_stream_seek()
426 data->position = *newoffset; in phar_stream_seek()
436 phar_entry_data *data = (phar_entry_data *) stream->abstract; in phar_stream_write() local
438 php_stream_seek(data->fp, data->position, SEEK_SET); in phar_stream_write()
439 if (count != php_stream_write(data->fp, buf, count)) { in phar_stream_write()
440 …rite %d characters to \"%s\" in phar \"%s\"", (int) count, data->internal_file->filename, data->ph… in phar_stream_write()
443 data->position = php_stream_tell(data->fp); 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()
461 phar_entry_data *data = (phar_entry_data *) stream->abstract; in phar_stream_flush() local
463 if (data->internal_file->is_modified) { in phar_stream_flush()
464 data->internal_file->timestamp = time(0); in phar_stream_flush()
465 ret = phar_flush(data->phar, 0, 0, 0, &error TSRMLS_CC); in phar_stream_flush()
481 void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, zend_bool… in phar_dostat() argument
485 if (!is_temp_dir && !data->is_dir) { in phar_dostat()
486 ssb->sb.st_size = data->uncompressed_filesize; in phar_dostat()
487 ssb->sb.st_mode = data->flags & PHAR_ENT_PERM_MASK; in phar_dostat()
491 ssb->sb.st_mtime.tv_sec = data->timestamp; in phar_dostat()
492 ssb->sb.st_atime.tv_sec = data->timestamp; in phar_dostat()
493 ssb->sb.st_ctime.tv_sec = data->timestamp; in phar_dostat()
495 ssb->sb.st_mtime = data->timestamp; in phar_dostat()
496 ssb->sb.st_atime = data->timestamp; in phar_dostat()
497 ssb->sb.st_ctime = data->timestamp; in phar_dostat()
499 } else if (!is_temp_dir && data->is_dir) { in phar_dostat()
501 ssb->sb.st_mode = data->flags & PHAR_ENT_PERM_MASK; in phar_dostat()
505 ssb->sb.st_mtime.tv_sec = data->timestamp; in phar_dostat()
506 ssb->sb.st_atime.tv_sec = data->timestamp; in phar_dostat()
507 ssb->sb.st_ctime.tv_sec = data->timestamp; in phar_dostat()
509 ssb->sb.st_mtime = data->timestamp; in phar_dostat()
510 ssb->sb.st_atime = data->timestamp; in phar_dostat()
511 ssb->sb.st_ctime = data->timestamp; in phar_dostat()
537 ssb->sb.st_ino = data->inode; in phar_dostat()
551 phar_entry_data *data = (phar_entry_data *)stream->abstract; in phar_stream_stat() local
558 phar_dostat(data->phar, data->internal_file, ssb, 0 TSRMLS_CC); in phar_stream_stat()