1.20.x system.archiver.inc public ArchiverZip::add($file_path)

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.

Overrides ArchiverInterface::add

File

modules/system/system.archiver.inc, line 95
Archiver implementations provided by the system module.

Class

ArchiverZip
Archiver for .zip files.

Code

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

  return $this;
}