public function __construct(\Path $path) { $this->archive = \RarArchive::open($path->getPathName()); if (!$this->archive) { throw new Exception('Failed to open archive'); } }
public function __construct(\Path $path) { $this->archive = new \ZipArchive(); $result = $this->archive->open($path->getPathName()); if (!$result) { throw new Exception('Failed to open archive'); } }