function ArchiverZip::__construct
Overrides ArchiverInterface::__construct
File
-
modules/
system/ system.archiver.inc, line 87
Class
- ArchiverZip
- Archiver for .zip files.
Code
public function __construct($file_path) {
$this->zip = new ZipArchive();
if ($this->zip
->open($file_path) !== TRUE) {
// @todo: This should be an interface-specific exception some day.
throw new Exception(t('Cannot open %file_path', array(
'%file_path' => $file_path,
)));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.