public function Archive_Tar::_readBlock in Drupal 7
Return value
null|string
4 calls to Archive_Tar::_readBlock()
- Archive_Tar::_extractInString in modules/
system/ system.tar.inc - This method extract from the archive one file identified by $p_filename. The return value is a string with the file content, or null on error.
- Archive_Tar::_extractList in modules/
system/ system.tar.inc - Archive_Tar::_jumpBlock in modules/
system/ system.tar.inc - Archive_Tar::_readLongHeader in modules/
system/ system.tar.inc
File
- modules/
system/ system.tar.inc, line 1106
Class
Code
public function _readBlock() {
$v_block = null;
if (is_resource($this->_file)) {
if ($this->_compress_type == 'gz') {
$v_block = @gzread($this->_file, 512);
}
else {
if ($this->_compress_type == 'bz2') {
$v_block = @bzread($this->_file, 512);
}
else {
if ($this->_compress_type == 'lzma2') {
$v_block = @xzread($this->_file, 512);
}
else {
if ($this->_compress_type == 'none') {
$v_block = @fread($this->_file, 512);
}
else {
$this
->_error('Unknown or missing compression type (' . $this->_compress_type . ')');
}
}
}
}
}
return $v_block;
}