function ArchiverInterface::add

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

Adds the specified file or directory to the archive.

Parameters

$file_path: The full system path of the file or directory to add. Only local files and directories are supported.

Return value

ArchiverInterface The called object.

2 methods override ArchiverInterface::add()
ArchiverTar::add in modules/system/system.archiver.inc
Adds the specified file or directory to the archive.
ArchiverZip::add in modules/system/system.archiver.inc
Adds the specified file or directory to the archive.

File

includes/archiver.inc, line 33

Class

ArchiverInterface
Defines the common interface for all Archiver classes.

Code

public function add($file_path);

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