| 1 |
<?php |
| 2 |
|
| 3 |
// Start of zip v.1.12.4 |
| 4 |
|
| 5 |
class ZipArchive { |
| 6 |
const CREATE = 1; |
| 7 |
const EXCL = 2; |
| 8 |
const CHECKCONS = 4; |
| 9 |
const OVERWRITE = 8; |
| 10 |
const FL_NOCASE = 1; |
| 11 |
const FL_NODIR = 2; |
| 12 |
const FL_COMPRESSED = 4; |
| 13 |
const FL_UNCHANGED = 8; |
| 14 |
const CM_DEFAULT = -1; |
| 15 |
const CM_STORE = 0; |
| 16 |
const CM_SHRINK = 1; |
| 17 |
const CM_REDUCE_1 = 2; |
| 18 |
const CM_REDUCE_2 = 3; |
| 19 |
const CM_REDUCE_3 = 4; |
| 20 |
const CM_REDUCE_4 = 5; |
| 21 |
const CM_IMPLODE = 6; |
| 22 |
const CM_DEFLATE = 8; |
| 23 |
const CM_DEFLATE64 = 9; |
| 24 |
const CM_PKWARE_IMPLODE = 10; |
| 25 |
const CM_BZIP2 = 12; |
| 26 |
const CM_LZMA = 14; |
| 27 |
const CM_TERSE = 18; |
| 28 |
const CM_LZ77 = 19; |
| 29 |
const CM_WAVPACK = 97; |
| 30 |
const CM_PPMD = 98; |
| 31 |
const ER_OK = 0; |
| 32 |
const ER_MULTIDISK = 1; |
| 33 |
const ER_RENAME = 2; |
| 34 |
const ER_CLOSE = 3; |
| 35 |
const ER_SEEK = 4; |
| 36 |
const ER_READ = 5; |
| 37 |
const ER_WRITE = 6; |
| 38 |
const ER_CRC = 7; |
| 39 |
const ER_ZIPCLOSED = 8; |
| 40 |
const ER_NOENT = 9; |
| 41 |
const ER_EXISTS = 10; |
| 42 |
const ER_OPEN = 11; |
| 43 |
const ER_TMPOPEN = 12; |
| 44 |
const ER_ZLIB = 13; |
| 45 |
const ER_MEMORY = 14; |
| 46 |
const ER_CHANGED = 15; |
| 47 |
const ER_COMPNOTSUPP = 16; |
| 48 |
const ER_EOF = 17; |
| 49 |
const ER_INVAL = 18; |
| 50 |
const ER_NOZIP = 19; |
| 51 |
const ER_INTERNAL = 20; |
| 52 |
const ER_INCONS = 21; |
| 53 |
const ER_REMOVE = 22; |
| 54 |
const ER_DELETED = 23; |
| 55 |
const OPSYS_DOS = 0; |
| 56 |
const OPSYS_AMIGA = 1; |
| 57 |
const OPSYS_OPENVMS = 2; |
| 58 |
const OPSYS_UNIX = 3; |
| 59 |
const OPSYS_VM_CMS = 4; |
| 60 |
const OPSYS_ATARI_ST = 5; |
| 61 |
const OPSYS_OS_2 = 6; |
| 62 |
const OPSYS_MACINTOSH = 7; |
| 63 |
const OPSYS_Z_SYSTEM = 8; |
| 64 |
const OPSYS_Z_CPM = 9; |
| 65 |
const OPSYS_WINDOWS_NTFS = 10; |
| 66 |
const OPSYS_MVS = 11; |
| 67 |
const OPSYS_VSE = 12; |
| 68 |
const OPSYS_ACORN_RISC = 13; |
| 69 |
const OPSYS_VFAT = 14; |
| 70 |
const OPSYS_ALTERNATE_MVS = 15; |
| 71 |
const OPSYS_BEOS = 16; |
| 72 |
const OPSYS_TANDEM = 17; |
| 73 |
const OPSYS_OS_400 = 18; |
| 74 |
const OPSYS_OS_X = 19; |
| 75 |
const OPSYS_DEFAULT = 3; |
| 76 |
|
| 77 |
|
| 78 |
/** |
| 79 |
* Open a ZIP file archive |
| 80 |
* @link http://www.php.net/manual/en/ziparchive.open.php |
| 81 |
* @param filename string <p> |
| 82 |
* The file name of the ZIP archive to open. |
| 83 |
* </p> |
| 84 |
* @param flags int[optional] <p> |
| 85 |
* The mode to use to open the archive. |
| 86 |
* |
| 87 |
* |
| 88 |
* <p> |
| 89 |
* ZipArchive::OVERWRITE |
| 90 |
* </p> |
| 91 |
* @return mixed Error codes |
| 92 |
* |
| 93 |
* <p> |
| 94 |
* Returns true on success or the error code. |
| 95 |
* |
| 96 |
* |
| 97 |
* <p> |
| 98 |
* ZipArchive::ER_EXISTS |
| 99 |
* </p> |
| 100 |
* <p> |
| 101 |
* File already exists. |
| 102 |
* </p> |
| 103 |
* |
| 104 |
* |
| 105 |
* <p> |
| 106 |
* ZipArchive::ER_INCONS |
| 107 |
* </p> |
| 108 |
* <p> |
| 109 |
* Zip archive inconsistent. |
| 110 |
* </p> |
| 111 |
* |
| 112 |
* |
| 113 |
* <p> |
| 114 |
* ZipArchive::ER_INVAL |
| 115 |
* </p> |
| 116 |
* <p> |
| 117 |
* Invalid argument. |
| 118 |
* </p> |
| 119 |
* |
| 120 |
* |
| 121 |
* <p> |
| 122 |
* ZipArchive::ER_MEMORY |
| 123 |
* </p> |
| 124 |
* <p> |
| 125 |
* Malloc failure. |
| 126 |
* </p> |
| 127 |
* |
| 128 |
* |
| 129 |
* <p> |
| 130 |
* ZipArchive::ER_NOENT |
| 131 |
* </p> |
| 132 |
* <p> |
| 133 |
* No such file. |
| 134 |
* </p> |
| 135 |
* |
| 136 |
* |
| 137 |
* <p> |
| 138 |
* ZipArchive::ER_NOZIP |
| 139 |
* </p> |
| 140 |
* <p> |
| 141 |
* Not a zip archive. |
| 142 |
* </p> |
| 143 |
* |
| 144 |
* |
| 145 |
* <p> |
| 146 |
* ZipArchive::ER_OPEN |
| 147 |
* </p> |
| 148 |
* <p> |
| 149 |
* Can't open file. |
| 150 |
* </p> |
| 151 |
* |
| 152 |
* |
| 153 |
* <p> |
| 154 |
* ZipArchive::ER_READ |
| 155 |
* </p> |
| 156 |
* <p> |
| 157 |
* Read error. |
| 158 |
* </p> |
| 159 |
* |
| 160 |
* |
| 161 |
* <p> |
| 162 |
* ZipArchive::ER_SEEK |
| 163 |
* </p> |
| 164 |
* <p> |
| 165 |
* Seek error. |
| 166 |
* </p> |
| 167 |
* |
| 168 |
* |
| 169 |
* </p> |
| 170 |
*/ |
| 171 |
public function open ($filename, $flags = null) {} |
| 172 |
|
| 173 |
/** |
| 174 |
* Set the password for the active archive |
| 175 |
* @link http://www.php.net/manual/en/ziparchive.setpassword.php |
| 176 |
* @param password string <p> |
| 177 |
* The password to add to the archive. |
| 178 |
* </p> |
| 179 |
* @return bool Returns true on success, false on failure. |
| 180 |
*/ |
| 181 |
public function setPassword ($password) {} |
| 182 |
|
| 183 |
/** |
| 184 |
* Close the active archive (opened or newly created) |
| 185 |
* @link http://www.php.net/manual/en/ziparchive.close.php |
| 186 |
* @return bool Returns true on success, false on failure. |
| 187 |
*/ |
| 188 |
public function close () {} |
| 189 |
|
| 190 |
/** |
| 191 |
* Returns the status error message, system and/or zip messages |
| 192 |
* @link http://www.php.net/manual/en/ziparchive.getstatusstring.php |
| 193 |
* @return string a string with the status message on success&return.falseforfailure;. |
| 194 |
*/ |
| 195 |
public function getStatusString () {} |
| 196 |
|
| 197 |
/** |
| 198 |
* Add a new directory |
| 199 |
* @link http://www.php.net/manual/en/ziparchive.addemptydir.php |
| 200 |
* @param dirname string <p> |
| 201 |
* The directory to add. |
| 202 |
* </p> |
| 203 |
* @return bool Returns true on success, false on failure. |
| 204 |
*/ |
| 205 |
public function addEmptyDir ($dirname) {} |
| 206 |
|
| 207 |
/** |
| 208 |
* Add a file to a ZIP archive using its contents |
| 209 |
* @link http://www.php.net/manual/en/ziparchive.addfromstring.php |
| 210 |
* @param localname string <p> |
| 211 |
* The name of the entry to create. |
| 212 |
* </p> |
| 213 |
* @param contents string <p> |
| 214 |
* The contents to use to create the entry. It is used in a binary |
| 215 |
* safe mode. |
| 216 |
* </p> |
| 217 |
* @return bool Returns true on success, false on failure. |
| 218 |
*/ |
| 219 |
public function addFromString ($localname, $contents) {} |
| 220 |
|
| 221 |
/** |
| 222 |
* Adds a file to a ZIP archive from the given path |
| 223 |
* @link http://www.php.net/manual/en/ziparchive.addfile.php |
| 224 |
* @param filename string <p> |
| 225 |
* The path to the file to add. |
| 226 |
* </p> |
| 227 |
* @param localname string[optional] <p> |
| 228 |
* If supplied, this is the local name inside the ZIP archive that will override the filename. |
| 229 |
* </p> |
| 230 |
* @param start int[optional] <p> |
| 231 |
* This parameter is not used but is required to extend ZipArchive. |
| 232 |
* </p> |
| 233 |
* @param length int[optional] <p> |
| 234 |
* This parameter is not used but is required to extend ZipArchive. |
| 235 |
* </p> |
| 236 |
* @return bool Returns true on success, false on failure. |
| 237 |
*/ |
| 238 |
public function addFile ($filename, $localname = null, $start = null, $length = null) {} |
| 239 |
|
| 240 |
/** |
| 241 |
* Add files from a directory by glob pattern |
| 242 |
* @link http://www.php.net/manual/en/ziparchive.addglob.php |
| 243 |
* @param pattern |
| 244 |
* @param flags[optional] |
| 245 |
* @param options[optional] |
| 246 |
*/ |
| 247 |
public function addGlob ($pattern, $flags, $options) {} |
| 248 |
|
| 249 |
/** |
| 250 |
* Add files from a directory by PCRE pattern |
| 251 |
* @link http://www.php.net/manual/en/ziparchive.addpattern.php |
| 252 |
* @param pattern |
| 253 |
* @param path[optional] |
| 254 |
* @param options[optional] |
| 255 |
*/ |
| 256 |
public function addPattern ($pattern, $path, $options) {} |
| 257 |
|
| 258 |
/** |
| 259 |
* Renames an entry defined by its index |
| 260 |
* @link http://www.php.net/manual/en/ziparchive.renameindex.php |
| 261 |
* @param index int <p> |
| 262 |
* Index of the entry to rename. |
| 263 |
* </p> |
| 264 |
* @param newname string <p> |
| 265 |
* New name. |
| 266 |
* </p> |
| 267 |
* @return bool Returns true on success, false on failure. |
| 268 |
*/ |
| 269 |
public function renameIndex ($index, $newname) {} |
| 270 |
|
| 271 |
/** |
| 272 |
* Renames an entry defined by its name |
| 273 |
* @link http://www.php.net/manual/en/ziparchive.renamename.php |
| 274 |
* @param name string <p> |
| 275 |
* Name of the entry to rename. |
| 276 |
* </p> |
| 277 |
* @param newname string <p> |
| 278 |
* New name. |
| 279 |
* </p> |
| 280 |
* @return bool Returns true on success, false on failure. |
| 281 |
*/ |
| 282 |
public function renameName ($name, $newname) {} |
| 283 |
|
| 284 |
/** |
| 285 |
* Set the comment of a ZIP archive |
| 286 |
* @link http://www.php.net/manual/en/ziparchive.setarchivecomment.php |
| 287 |
* @param comment string <p> |
| 288 |
* The contents of the comment. |
| 289 |
* </p> |
| 290 |
* @return bool Returns true on success, false on failure. |
| 291 |
*/ |
| 292 |
public function setArchiveComment ($comment) {} |
| 293 |
|
| 294 |
/** |
| 295 |
* Returns the Zip archive comment |
| 296 |
* @link http://www.php.net/manual/en/ziparchive.getarchivecomment.php |
| 297 |
* @param flags int[optional] <p> |
| 298 |
* If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged |
| 299 |
* comment is returned. |
| 300 |
* </p> |
| 301 |
* @return string the Zip archive comment&return.falseforfailure;. |
| 302 |
*/ |
| 303 |
public function getArchiveComment ($flags = null) {} |
| 304 |
|
| 305 |
/** |
| 306 |
* Set the comment of an entry defined by its index |
| 307 |
* @link http://www.php.net/manual/en/ziparchive.setcommentindex.php |
| 308 |
* @param index int <p> |
| 309 |
* Index of the entry. |
| 310 |
* </p> |
| 311 |
* @param comment string <p> |
| 312 |
* The contents of the comment. |
| 313 |
* </p> |
| 314 |
* @return bool Returns true on success, false on failure. |
| 315 |
*/ |
| 316 |
public function setCommentIndex ($index, $comment) {} |
| 317 |
|
| 318 |
/** |
| 319 |
* Set the comment of an entry defined by its name |
| 320 |
* @link http://www.php.net/manual/en/ziparchive.setcommentname.php |
| 321 |
* @param name string <p> |
| 322 |
* Name of the entry. |
| 323 |
* </p> |
| 324 |
* @param comment string <p> |
| 325 |
* The contents of the comment. |
| 326 |
* </p> |
| 327 |
* @return bool Returns true on success, false on failure. |
| 328 |
*/ |
| 329 |
public function setCommentName ($name, $comment) {} |
| 330 |
|
| 331 |
/** |
| 332 |
* Returns the comment of an entry using the entry index |
| 333 |
* @link http://www.php.net/manual/en/ziparchive.getcommentindex.php |
| 334 |
* @param index int <p> |
| 335 |
* Index of the entry |
| 336 |
* </p> |
| 337 |
* @param flags int[optional] <p> |
| 338 |
* If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged |
| 339 |
* comment is returned. |
| 340 |
* </p> |
| 341 |
* @return string the comment on success&return.falseforfailure;. |
| 342 |
*/ |
| 343 |
public function getCommentIndex ($index, $flags = null) {} |
| 344 |
|
| 345 |
/** |
| 346 |
* Returns the comment of an entry using the entry name |
| 347 |
* @link http://www.php.net/manual/en/ziparchive.getcommentname.php |
| 348 |
* @param name string <p> |
| 349 |
* Name of the entry |
| 350 |
* </p> |
| 351 |
* @param flags int[optional] <p> |
| 352 |
* If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged |
| 353 |
* comment is returned. |
| 354 |
* </p> |
| 355 |
* @return string the comment on success&return.falseforfailure;. |
| 356 |
*/ |
| 357 |
public function getCommentName ($name, $flags = null) {} |
| 358 |
|
| 359 |
/** |
| 360 |
* delete an entry in the archive using its index |
| 361 |
* @link http://www.php.net/manual/en/ziparchive.deleteindex.php |
| 362 |
* @param index int <p> |
| 363 |
* Index of the entry to delete. |
| 364 |
* </p> |
| 365 |
* @return bool Returns true on success, false on failure. |
| 366 |
*/ |
| 367 |
public function deleteIndex ($index) {} |
| 368 |
|
| 369 |
/** |
| 370 |
* delete an entry in the archive using its name |
| 371 |
* @link http://www.php.net/manual/en/ziparchive.deletename.php |
| 372 |
* @param name string <p> |
| 373 |
* Name of the entry to delete. |
| 374 |
* </p> |
| 375 |
* @return bool Returns true on success, false on failure. |
| 376 |
*/ |
| 377 |
public function deleteName ($name) {} |
| 378 |
|
| 379 |
/** |
| 380 |
* Get the details of an entry defined by its name. |
| 381 |
* @link http://www.php.net/manual/en/ziparchive.statname.php |
| 382 |
* @param name string <p> |
| 383 |
* Name of the entry |
| 384 |
* </p> |
| 385 |
* @param flags int[optional] <p> |
| 386 |
* The flags argument specifies how the name lookup should be done. |
| 387 |
* Also, ZipArchive::FL_UNCHANGED may be ORed to it to request |
| 388 |
* information about the original file in the archive, |
| 389 |
* ignoring any changes made. |
| 390 |
* |
| 391 |
* |
| 392 |
* <p> |
| 393 |
* ZipArchive::FL_NOCASE |
| 394 |
* </p> |
| 395 |
* @return array an array containing the entry details &return.falseforfailure;. |
| 396 |
*/ |
| 397 |
public function statName ($name, $flags = null) {} |
| 398 |
|
| 399 |
/** |
| 400 |
* Get the details of an entry defined by its index. |
| 401 |
* @link http://www.php.net/manual/en/ziparchive.statindex.php |
| 402 |
* @param index int <p> |
| 403 |
* Index of the entry |
| 404 |
* </p> |
| 405 |
* @param flags int[optional] <p> |
| 406 |
* ZipArchive::FL_UNCHANGED may be ORed to it to request |
| 407 |
* information about the original file in the archive, |
| 408 |
* ignoring any changes made. |
| 409 |
* </p> |
| 410 |
* @return array an array containing the entry details&return.falseforfailure;. |
| 411 |
*/ |
| 412 |
public function statIndex ($index, $flags = null) {} |
| 413 |
|
| 414 |
/** |
| 415 |
* Returns the index of the entry in the archive |
| 416 |
* @link http://www.php.net/manual/en/ziparchive.locatename.php |
| 417 |
* @param name string <p> |
| 418 |
* The name of the entry to look up |
| 419 |
* </p> |
| 420 |
* @param flags int[optional] <p> |
| 421 |
* The flags are specified by ORing the following values, |
| 422 |
* or 0 for none of them. |
| 423 |
* |
| 424 |
* |
| 425 |
* <p> |
| 426 |
* ZipArchive::FL_NOCASE |
| 427 |
* </p> |
| 428 |
* @return int the index of the entry on success&return.falseforfailure;. |
| 429 |
*/ |
| 430 |
public function locateName ($name, $flags = null) {} |
| 431 |
|
| 432 |
/** |
| 433 |
* Returns the name of an entry using its index |
| 434 |
* @link http://www.php.net/manual/en/ziparchive.getnameindex.php |
| 435 |
* @param index int <p> |
| 436 |
* Index of the entry. |
| 437 |
* </p> |
| 438 |
* @param flags int[optional] <p> |
| 439 |
* If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged |
| 440 |
* name is returned. |
| 441 |
* </p> |
| 442 |
* @return string the name on success&return.falseforfailure;. |
| 443 |
*/ |
| 444 |
public function getNameIndex ($index, $flags = null) {} |
| 445 |
|
| 446 |
/** |
| 447 |
* Revert all global changes done in the archive. |
| 448 |
* @link http://www.php.net/manual/en/ziparchive.unchangearchive.php |
| 449 |
* @return bool Returns true on success, false on failure. |
| 450 |
*/ |
| 451 |
public function unchangeArchive () {} |
| 452 |
|
| 453 |
/** |
| 454 |
* Undo all changes done in the archive |
| 455 |
* @link http://www.php.net/manual/en/ziparchive.unchangeall.php |
| 456 |
* @return bool Returns true on success, false on failure. |
| 457 |
*/ |
| 458 |
public function unchangeAll () {} |
| 459 |
|
| 460 |
/** |
| 461 |
* Revert all changes done to an entry at the given index |
| 462 |
* @link http://www.php.net/manual/en/ziparchive.unchangeindex.php |
| 463 |
* @param index int <p> |
| 464 |
* Index of the entry. |
| 465 |
* </p> |
| 466 |
* @return bool Returns true on success, false on failure. |
| 467 |
*/ |
| 468 |
public function unchangeIndex ($index) {} |
| 469 |
|
| 470 |
/** |
| 471 |
* Revert all changes done to an entry with the given name. |
| 472 |
* @link http://www.php.net/manual/en/ziparchive.unchangename.php |
| 473 |
* @param name string <p> |
| 474 |
* Name of the entry. |
| 475 |
* </p> |
| 476 |
* @return bool Returns true on success, false on failure. |
| 477 |
*/ |
| 478 |
public function unchangeName ($name) {} |
| 479 |
|
| 480 |
/** |
| 481 |
* Extract the archive contents |
| 482 |
* @link http://www.php.net/manual/en/ziparchive.extractto.php |
| 483 |
* @param destination string <p> |
| 484 |
* Location where to extract the files. |
| 485 |
* </p> |
| 486 |
* @param entries mixed[optional] <p> |
| 487 |
* The entries to extract. It accepts either a single entry name or |
| 488 |
* an array of names. |
| 489 |
* </p> |
| 490 |
* @return bool Returns true on success, false on failure. |
| 491 |
*/ |
| 492 |
public function extractTo ($destination, $entries = null) {} |
| 493 |
|
| 494 |
/** |
| 495 |
* Returns the entry contents using its name |
| 496 |
* @link http://www.php.net/manual/en/ziparchive.getfromname.php |
| 497 |
* @param name string <p> |
| 498 |
* Name of the entry |
| 499 |
* </p> |
| 500 |
* @param length int[optional] <p> |
| 501 |
* The length to be read from the entry. If 0, then the |
| 502 |
* entire entry is read. |
| 503 |
* </p> |
| 504 |
* @param flags int[optional] <p> |
| 505 |
* The flags to use to open the archive. the following values may |
| 506 |
* be ORed to it. |
| 507 |
* |
| 508 |
* |
| 509 |
* <p> |
| 510 |
* ZipArchive::FL_UNCHANGED |
| 511 |
* </p> |
| 512 |
* @return string the contents of the entry on success&return.falseforfailure;. |
| 513 |
*/ |
| 514 |
public function getFromName ($name, $length = null, $flags = null) {} |
| 515 |
|
| 516 |
/** |
| 517 |
* Returns the entry contents using its index |
| 518 |
* @link http://www.php.net/manual/en/ziparchive.getfromindex.php |
| 519 |
* @param index int <p> |
| 520 |
* Index of the entry |
| 521 |
* </p> |
| 522 |
* @param length int[optional] <p> |
| 523 |
* The length to be read from the entry. If 0, then the |
| 524 |
* entire entry is read. |
| 525 |
* </p> |
| 526 |
* @param flags int[optional] <p> |
| 527 |
* The flags to use to open the archive. the following values may |
| 528 |
* be ORed to it. |
| 529 |
* |
| 530 |
* |
| 531 |
* <p> |
| 532 |
* ZipArchive::FL_UNCHANGED |
| 533 |
* </p> |
| 534 |
* @return string the contents of the entry on success&return.falseforfailure;. |
| 535 |
*/ |
| 536 |
public function getFromIndex ($index, $length = null, $flags = null) {} |
| 537 |
|
| 538 |
/** |
| 539 |
* Get a file handler to the entry defined by its name (read only). |
| 540 |
* @link http://www.php.net/manual/en/ziparchive.getstream.php |
| 541 |
* @param name string <p> |
| 542 |
* The name of the entry to use. |
| 543 |
* </p> |
| 544 |
* @return resource a file pointer (resource) on success&return.falseforfailure;. |
| 545 |
*/ |
| 546 |
public function getStream ($name) {} |
| 547 |
|
| 548 |
/** |
| 549 |
* Set the external attributes of an entry defined by its name |
| 550 |
* @link http://www.php.net/manual/en/ziparchive.setexternalattributesname.php |
| 551 |
* @param name string <p> |
| 552 |
* Name of the entry. |
| 553 |
* </p> |
| 554 |
* @param opsys int <p> |
| 555 |
* The operating system code defined by one of the ZipArchive::OPSYS_ constants. |
| 556 |
* </p> |
| 557 |
* @param attr int <p> |
| 558 |
* The external attributes. Value depends on operating system. |
| 559 |
* </p> |
| 560 |
* @param flags int[optional] <p> |
| 561 |
* Optional flags. Currently unused. |
| 562 |
* </p> |
| 563 |
* @return bool Returns true on success, false on failure. |
| 564 |
*/ |
| 565 |
public function setExternalAttributesName ($name, $opsys, $attr, $flags = null) {} |
| 566 |
|
| 567 |
/** |
| 568 |
* Set the external attributes of an entry defined by its index |
| 569 |
* @link http://www.php.net/manual/en/ziparchive.setexternalattributesindex.php |
| 570 |
* @param index int <p> |
| 571 |
* Index of the entry. |
| 572 |
* </p> |
| 573 |
* @param opsys int <p> |
| 574 |
* The operating system code defined by one of the ZipArchive::OPSYS_ constants. |
| 575 |
* </p> |
| 576 |
* @param attr int <p> |
| 577 |
* The external attributes. Value depends on operating system. |
| 578 |
* </p> |
| 579 |
* @param flags int[optional] <p> |
| 580 |
* Optional flags. Currently unused. |
| 581 |
* </p> |
| 582 |
* @return bool Returns true on success, false on failure. |
| 583 |
*/ |
| 584 |
public function setExternalAttributesIndex ($index, $opsys, $attr, $flags = null) {} |
| 585 |
|
| 586 |
/** |
| 587 |
* Retrieve the external attributes of an entry defined by its name |
| 588 |
* @link http://www.php.net/manual/en/ziparchive.getexternalattributesname.php |
| 589 |
* @param name string <p> |
| 590 |
* Name of the entry. |
| 591 |
* </p> |
| 592 |
* @param opsys int <p> |
| 593 |
* On success, receive the operating system code defined by one of the ZipArchive::OPSYS_ constants. |
| 594 |
* </p> |
| 595 |
* @param attr int <p> |
| 596 |
* On success, receive the external attributes. Value depends on operating system. |
| 597 |
* </p> |
| 598 |
* @param flags int[optional] <p> |
| 599 |
* If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged |
| 600 |
* attributes are returned. |
| 601 |
* </p> |
| 602 |
* @return bool Returns true on success, false on failure. |
| 603 |
*/ |
| 604 |
public function getExternalAttributesName ($name, &$opsys, &$attr, $flags = null) {} |
| 605 |
|
| 606 |
/** |
| 607 |
* Retrieve the external attributes of an entry defined by its index |
| 608 |
* @link http://www.php.net/manual/en/ziparchive.getexternalattributesindex.php |
| 609 |
* @param index int <p> |
| 610 |
* Index of the entry. |
| 611 |
* </p> |
| 612 |
* @param opsys int <p> |
| 613 |
* On success, receive the operating system code defined by one of the ZipArchive::OPSYS_ constants. |
| 614 |
* </p> |
| 615 |
* @param attr int <p> |
| 616 |
* On success, receive the external attributes. Value depends on operating system. |
| 617 |
* </p> |
| 618 |
* @param flags int[optional] <p> |
| 619 |
* If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged |
| 620 |
* attributes are returned. |
| 621 |
* </p> |
| 622 |
* @return bool Returns true on success, false on failure. |
| 623 |
*/ |
| 624 |
public function getExternalAttributesIndex ($index, &$opsys, &$attr, $flags = null) {} |
| 625 |
|
| 626 |
} |
| 627 |
|
| 628 |
/** |
| 629 |
* Open a ZIP file archive |
| 630 |
* @link http://www.php.net/manual/en/function.zip-open.php |
| 631 |
* @param filename string <p> |
| 632 |
* The file name of the ZIP archive to open. |
| 633 |
* </p> |
| 634 |
* @return resource a resource handle for later use with |
| 635 |
* zip_read and zip_close |
| 636 |
* or returns the number of error if filename does not |
| 637 |
* exist or in case of other error. |
| 638 |
*/ |
| 639 |
function zip_open ($filename) {} |
| 640 |
|
| 641 |
/** |
| 642 |
* Close a ZIP file archive |
| 643 |
* @link http://www.php.net/manual/en/function.zip-close.php |
| 644 |
* @param zip resource <p> |
| 645 |
* A ZIP file previously opened with zip_open. |
| 646 |
* </p> |
| 647 |
* @return void |
| 648 |
*/ |
| 649 |
function zip_close ($zip) {} |
| 650 |
|
| 651 |
/** |
| 652 |
* Read next entry in a ZIP file archive |
| 653 |
* @link http://www.php.net/manual/en/function.zip-read.php |
| 654 |
* @param zip resource <p> |
| 655 |
* A ZIP file previously opened with zip_open. |
| 656 |
* </p> |
| 657 |
* @return resource a directory entry resource for later use with the |
| 658 |
* zip_entry_... functions, or false if |
| 659 |
* there are no more entries to read, or an error code if an error |
| 660 |
* occurred. |
| 661 |
*/ |
| 662 |
function zip_read ($zip) {} |
| 663 |
|
| 664 |
/** |
| 665 |
* Open a directory entry for reading |
| 666 |
* @link http://www.php.net/manual/en/function.zip-entry-open.php |
| 667 |
* @param zip resource <p> |
| 668 |
* A valid resource handle returned by zip_open. |
| 669 |
* </p> |
| 670 |
* @param zip_entry resource <p> |
| 671 |
* A directory entry returned by zip_read. |
| 672 |
* </p> |
| 673 |
* @param mode string[optional] <p> |
| 674 |
* Any of the modes specified in the documentation of |
| 675 |
* fopen. |
| 676 |
* </p> |
| 677 |
* |
| 678 |
* <p> |
| 679 |
* Currently, mode is ignored and is always |
| 680 |
* "rb". This is due to the fact that zip support |
| 681 |
* in PHP is read only access. |
| 682 |
* </p> |
| 683 |
* @return bool Returns true on success, false on failure. |
| 684 |
* </p> |
| 685 |
* |
| 686 |
* <p> |
| 687 |
* Unlike fopen and other similar functions, |
| 688 |
* the return value of zip_entry_open only |
| 689 |
* indicates the result of the operation and is not needed for |
| 690 |
* reading or closing the directory entry. |
| 691 |
*/ |
| 692 |
function zip_entry_open ($zip, $zip_entry, $mode = null) {} |
| 693 |
|
| 694 |
/** |
| 695 |
* Close a directory entry |
| 696 |
* @link http://www.php.net/manual/en/function.zip-entry-close.php |
| 697 |
* @param zip_entry resource <p> |
| 698 |
* A directory entry previously opened zip_entry_open. |
| 699 |
* </p> |
| 700 |
* @return bool Returns true on success, false on failure. |
| 701 |
*/ |
| 702 |
function zip_entry_close ($zip_entry) {} |
| 703 |
|
| 704 |
/** |
| 705 |
* Read from an open directory entry |
| 706 |
* @link http://www.php.net/manual/en/function.zip-entry-read.php |
| 707 |
* @param zip_entry resource <p> |
| 708 |
* A directory entry returned by zip_read. |
| 709 |
* </p> |
| 710 |
* @param length int[optional] <p> |
| 711 |
* The number of bytes to return. |
| 712 |
* </p> |
| 713 |
* |
| 714 |
* <p> |
| 715 |
* This should be the uncompressed length you wish to read. |
| 716 |
* </p> |
| 717 |
* @return string the data read, empty string on end of a file, or false on error. |
| 718 |
*/ |
| 719 |
function zip_entry_read ($zip_entry, $length = null) {} |
| 720 |
|
| 721 |
/** |
| 722 |
* Retrieve the actual file size of a directory entry |
| 723 |
* @link http://www.php.net/manual/en/function.zip-entry-filesize.php |
| 724 |
* @param zip_entry resource <p> |
| 725 |
* A directory entry returned by zip_read. |
| 726 |
* </p> |
| 727 |
* @return int The size of the directory entry. |
| 728 |
*/ |
| 729 |
function zip_entry_filesize ($zip_entry) {} |
| 730 |
|
| 731 |
/** |
| 732 |
* Retrieve the name of a directory entry |
| 733 |
* @link http://www.php.net/manual/en/function.zip-entry-name.php |
| 734 |
* @param zip_entry resource <p> |
| 735 |
* A directory entry returned by zip_read. |
| 736 |
* </p> |
| 737 |
* @return string The name of the directory entry. |
| 738 |
*/ |
| 739 |
function zip_entry_name ($zip_entry) {} |
| 740 |
|
| 741 |
/** |
| 742 |
* Retrieve the compressed size of a directory entry |
| 743 |
* @link http://www.php.net/manual/en/function.zip-entry-compressedsize.php |
| 744 |
* @param zip_entry resource <p> |
| 745 |
* A directory entry returned by zip_read. |
| 746 |
* </p> |
| 747 |
* @return int The compressed size. |
| 748 |
*/ |
| 749 |
function zip_entry_compressedsize ($zip_entry) {} |
| 750 |
|
| 751 |
/** |
| 752 |
* Retrieve the compression method of a directory entry |
| 753 |
* @link http://www.php.net/manual/en/function.zip-entry-compressionmethod.php |
| 754 |
* @param zip_entry resource <p> |
| 755 |
* A directory entry returned by zip_read. |
| 756 |
* </p> |
| 757 |
* @return string The compression method. |
| 758 |
*/ |
| 759 |
function zip_entry_compressionmethod ($zip_entry) {} |
| 760 |
|
| 761 |
// End of zip v.1.12.4 |
| 762 |
?> |