function PclZip::privWriteCentralHeader in Quiz 6.5
Same name and namespace in other branches
- 6.6 includes/moodle/lib/pclzip/pclzip.lib.php \PclZip::privWriteCentralHeader()
4 calls to PclZip::privWriteCentralHeader()
- PclZip::privAdd in includes/
moodle/ lib/ pclzip/ pclzip.lib.php - PclZip::privAddList in includes/
moodle/ lib/ pclzip/ pclzip.lib.php - PclZip::privDeleteByRule in includes/
moodle/ lib/ pclzip/ pclzip.lib.php - PclZip::privMerge in includes/
moodle/ lib/ pclzip/ pclzip.lib.php
File
- includes/
moodle/ lib/ pclzip/ pclzip.lib.php, line 2948
Class
Code
function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment) {
//--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralHeader", 'nb_entries='.$p_nb_entries.', size='.$p_size.', offset='.$p_offset.', comment="'.$p_comment.'"');
$v_result = 1;
// ----- Packed data
$v_binary_data = pack("VvvvvVVv", 0x6054b50, 0, 0, $p_nb_entries, $p_nb_entries, $p_size, $p_offset, strlen($p_comment));
// ----- Write the 22 bytes of the header in the zip file
fputs($this->zip_fd, $v_binary_data, 22);
// ----- Write the variable fields
if (strlen($p_comment) != 0) {
fputs($this->zip_fd, $p_comment, strlen($p_comment));
}
// ----- Return
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
return $v_result;
}