Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Tar.php

function Archive_Tar::_writeBlock

Parameters

mixed $p_binary_data:

integer $p_len:

Return value

bool

7 calls to Archive_Tar::_writeBlock()
Archive_Tar::_addFile in vendor/pear/archive_tar/Archive/Tar.php
Archive_Tar::_addString in vendor/pear/archive_tar/Archive/Tar.php
Archive_Tar::_openAppend in vendor/pear/archive_tar/Archive/Tar.php
Archive_Tar::_writeFooter in vendor/pear/archive_tar/Archive/Tar.php
Archive_Tar::_writeHeader in vendor/pear/archive_tar/Archive/Tar.php

... See full list

File

vendor/pear/archive_tar/Archive/Tar.php, line 990

Class

Archive_Tar
Creates a (compressed) Tar archive

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal