You are here

public function Zip::add in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Archiver/Zip.php \Drupal\Core\Archiver\Zip::add()
  2. 9 core/lib/Drupal/Core/Archiver/Zip.php \Drupal\Core\Archiver\Zip::add()

File

core/lib/Drupal/Core/Archiver/Zip.php, line 39

Class

Zip
Defines an archiver implementation for .zip files.

Namespace

Drupal\Core\Archiver

Code

public function add($file_path) {
  $this->zip
    ->addFile($file_path);
  return $this;
}