function Zip::add
Adds the specified file or directory to the archive.
Parameters
string $file_path: The full system path of the file or directory to add. Only local files and directories are supported.
Return value
$this The called object.
Overrides ArchiverInterface::add
File
-
core/
lib/ Drupal/ Core/ Archiver/ Zip.php, line 42
Class
- Zip
- Defines an archiver implementation for .zip files.
Namespace
Drupal\Core\ArchiverCode
public function add($file_path) {
$this->zip
->addFile($file_path);
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.