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

Breadcrumb

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

function Archive_Tar::_jumpBlock

Parameters

null $p_len:

Return value

bool

2 calls to Archive_Tar::_jumpBlock()
Archive_Tar::_extractInString in vendor/pear/archive_tar/Archive/Tar.php
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 vendor/pear/archive_tar/Archive/Tar.php

File

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

Class

Archive_Tar
Creates a (compressed) Tar archive

Code

public function _jumpBlock($p_len = null) {
    if (is_resource($this->_file)) {
        if ($p_len === null) {
            $p_len = 1;
        }
        if ($this->_compress_type == 'gz') {
            @gzseek($this->_file, gztell($this->_file) + $p_len * 512);
        }
        else {
            if ($this->_compress_type == 'bz2') {
                // ----- Replace missing bztell() and bzseek()
                for ($i = 0; $i < $p_len; $i++) {
                    $this->_readBlock();
                }
            }
            else {
                if ($this->_compress_type == 'lzma2') {
                    // ----- Replace missing xztell() and xzseek()
                    for ($i = 0; $i < $p_len; $i++) {
                        $this->_readBlock();
                    }
                }
                else {
                    if ($this->_compress_type == 'none') {
                        @fseek($this->_file, $p_len * 512, SEEK_CUR);
                    }
                    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