function Tar::__construct

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Archiver/Tar.php \Drupal\Core\Archiver\Tar::__construct()
  2. 10 core/lib/Drupal/Core/Archiver/Tar.php \Drupal\Core\Archiver\Tar::__construct()
  3. 11.x core/lib/Drupal/Core/Archiver/Tar.php \Drupal\Core\Archiver\Tar::__construct()

Constructs a Tar object.

Parameters

string $file_path: The full system path of the archive to manipulate. Only local files are supported. If the file does not yet exist, it will be created if appropriate.

Throws

\Drupal\Core\Archiver\ArchiverException

File

core/lib/Drupal/Core/Archiver/Tar.php, line 27

Class

Tar
Defines an archiver implementation for .tar files.

Namespace

Drupal\Core\Archiver

Code

public function __construct($file_path) {
    $this->tar = new ArchiveTar($file_path);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.