Lines Matching full:zip
31 * This also puts the file into the zip package
33 public function __moveDataToZip($DATA, $FILENAME = 'toc.xml', $ZIP = null, $JUSTWRITE = false) { argument
43 // Add to zip
45 $status = $this->__writeFileToZip($tmpFile, $FILENAME, $ZIP);
47 $status = $this->__addFileToZip($tmpFile, $FILENAME, $ZIP);
58 * Adds a file to the zip file
59 * @param $FILE String file-name of the zip
61 * @param $ZIP String name of the zip file to which we add
63 public function __addFileToZip($FILE, $NAME, $ZIP = null) { argument
66 …$this->functions->debug->message("Weird, the NAME for the ZIP started with a '/'. This may result …
72 …debug->message("Trying to create PDF from File '$FILE' with name '$NAME' for ZIP '$ZIP'", null, 2);
76 …if ($this->functions->debug->debugLevel() <= 1) { // 2011-01-12 Write HTML to ZIP for Debug purpose
77 $this->__moveDataToZip($succeeded, "_debug/$NAME.html", $ZIP, true);
86 return $this->__writeFileToZip($FILE, $NAME, $ZIP);
90 * This really writes a file to a zip-file
91 * @param $FILE String file-name of the zip
93 * @param $ZIP String name of the zip file to which we add
103 $zip = new ZipArchive();
104 if (!$zip) {
109 $code = $zip->open($ZIPFILE, ZipArchive::CREATE);
112 $this->functions->debug->message("Adding file '{$NAME}' to ZIP {$ZIPFILE}", null, 2);
114 $zip->addFile($FILE, $NAME);
115 $zip->close();
124 $this->functions->debug->runtimeException("Zip Error #{$code} for file {$NAME}");
130 * @param $NAME String name of the file in the zip
134 $zip = new ZipArchive();
135 $code = $zip->open($this->functions->settings->zipFile, ZipArchive::CREATE);
137 $exists = !($zip->statName($NAME) === FALSE);
138 $zip->close();
206 $zip = new ZipArchive();
207 $code = $zip->open($data['file']);
209 $this->functions->debug->message("Can't open the zip-file.", $data['file'], 2);
213 if ($zip->numFiles != 1) {
214 $zip->close();
215 …$this->functions->debug->message("More than one ({$zip->numFiles}) file in zip.", $data['file'], 2…
219 $stat = $zip->statIndex(0);
222 $zip->close();
233 $zip->extractTo($folder, $stat['name']);
234 $zip->close();