public function ArchiveTar::_writeBlock in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Archiver/ArchiveTar.php \Drupal\Core\Archiver\ArchiveTar::_writeBlock()
Parameters
mixed $p_binary_data:
integer $p_len:
Return value
bool
7 calls to ArchiveTar::_writeBlock()
- ArchiveTar::_addFile in core/
lib/ Drupal/ Core/ Archiver/ ArchiveTar.php - ArchiveTar::_addString in core/
lib/ Drupal/ Core/ Archiver/ ArchiveTar.php - ArchiveTar::_openAppend in core/
lib/ Drupal/ Core/ Archiver/ ArchiveTar.php - ArchiveTar::_writeFooter in core/
lib/ Drupal/ Core/ Archiver/ ArchiveTar.php - ArchiveTar::_writeHeader in core/
lib/ Drupal/ Core/ Archiver/ ArchiveTar.php
File
- core/
lib/ Drupal/ Core/ Archiver/ ArchiveTar.php, line 1031
Class
Namespace
Drupal\Core\ArchiverCode
public function _writeBlock($p_binary_data, $p_len = null) {
if (is_resource($this->_file)) {
if ($p_len === null) {
if ($this->_compress_type == 'gz') {
@gzputs($this->_file, $p_binary_data);
}
else {
if ($this->_compress_type == 'bz2') {
@bzwrite($this->_file, $p_binary_data);
}
else {
if ($this->_compress_type == 'lzma2') {
@xzwrite($this->_file, $p_binary_data);
}
else {
if ($this->_compress_type == 'none') {
@fputs($this->_file, $p_binary_data);
}
else {
$this
->_error('Unknown or missing compression type (' . $this->_compress_type . ')');
}
}
}
}
}
else {
if ($this->_compress_type == 'gz') {
@gzputs($this->_file, $p_binary_data, $p_len);
}
else {
if ($this->_compress_type == 'bz2') {
@bzwrite($this->_file, $p_binary_data, $p_len);
}
else {
if ($this->_compress_type == 'lzma2') {
@xzwrite($this->_file, $p_binary_data, $p_len);
}
else {
if ($this->_compress_type == 'none') {
@fputs($this->_file, $p_binary_data, $p_len);
}
else {
$this
->_error('Unknown or missing compression type (' . $this->_compress_type . ')');
}
}
}
}
}
}
return true;
}