BlueSpice MediaWiki master
|
Public Member Functions | |
open ($filename, $flags=null) | |
close () | |
getStatusString () | |
addEmptyDir ($dirname) | |
addFromString ($localname, $contents) | |
addFile ($filename, $localname=null, $start=0, $length=0) | |
addGlob ($pattern, $flags=0, array $options=array()) | |
addPattern ($pattern, $path= '.', array $options=array()) | |
renameIndex ($index, $newname) | |
renameName ($name, $newname) | |
setArchiveComment ($comment) | |
getArchiveComment ($flags=null) | |
setCommentIndex ($index, $comment) | |
setCommentName ($name, $comment) | |
setCompressionIndex ($index, $comp_method, $comp_flags=0) | |
setCompressionName ($name, $comp_method, $comp_flags=0) | |
setPassword ($password) | |
getCommentIndex ($index, $flags=null) | |
getCommentName ($name, $flags=null) | |
deleteIndex ($index) | |
deleteName ($name) | |
statName ($name, $flags=null) | |
statIndex ($index, $flags=null) | |
locateName ($name, $flags=null) | |
getNameIndex ($index, $flags=null) | |
unchangeArchive () | |
unchangeAll () | |
unchangeIndex ($index) | |
unchangeName ($name) | |
extractTo ($destination, $entries=null) | |
getFromName ($name, $length=0, $flags=null) | |
getFromIndex ($index, $length=0, $flags=null) | |
getStream ($name) | |
Public Attributes | |
const | CREATE = 1 |
const | EXCL = 2 |
const | CHECKCONS = 4 |
const | OVERWRITE = 8 |
const | FL_NOCASE = 1 |
const | FL_NODIR = 2 |
const | FL_COMPRESSED = 4 |
const | FL_UNCHANGED = 8 |
const | CM_DEFAULT = -1 |
const | CM_STORE = 0 |
const | CM_SHRINK = 1 |
const | CM_REDUCE_1 = 2 |
const | CM_REDUCE_2 = 3 |
const | CM_REDUCE_3 = 4 |
const | CM_REDUCE_4 = 5 |
const | CM_IMPLODE = 6 |
const | CM_DEFLATE = 8 |
const | CM_DEFLATE64 = 9 |
const | CM_PKWARE_IMPLODE = 10 |
const | CM_BZIP2 = 12 |
const | CM_LZMA = 14 |
const | CM_TERSE = 18 |
const | CM_LZ77 = 19 |
const | CM_WAVPACK = 97 |
const | CM_PPMD = 98 |
const | ER_OK = 0 |
const | ER_MULTIDISK = 1 |
const | ER_RENAME = 2 |
const | ER_CLOSE = 3 |
const | ER_SEEK = 4 |
const | ER_READ = 5 |
const | ER_WRITE = 6 |
const | ER_CRC = 7 |
const | ER_ZIPCLOSED = 8 |
const | ER_NOENT = 9 |
const | ER_EXISTS = 10 |
const | ER_OPEN = 11 |
const | ER_TMPOPEN = 12 |
const | ER_ZLIB = 13 |
const | ER_MEMORY = 14 |
const | ER_CHANGED = 15 |
const | ER_COMPNOTSUPP = 16 |
const | ER_EOF = 17 |
const | ER_INVAL = 18 |
const | ER_NOZIP = 19 |
const | ER_INTERNAL = 20 |
const | ER_INCONS = 21 |
const | ER_REMOVE = 22 |
const | ER_DELETED = 23 |
$status | |
$statusSys | |
$numFiles | |
$filename | |
$comment | |
A file archive, compressed with Zip. http://php.net/manual/en/class.ziparchive.php
ZipArchive::addEmptyDir | ( | $dirname | ) |
(PHP 5 >= 5.2.0, PECL zip >= 1.8.0)
Add a new directory string $dirname The directory to add.
ZipArchive::addFile | ( | $filename, | |
$localname = null , |
|||
$start = 0 , |
|||
$length = 0 |
|||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)
Adds a file to a ZIP archive from the given path string $filename The path to the file to add.
string | $localname | [optional] |
If supplied, this is the local name inside the ZIP archive that will override the filename.
int | $start | [optional] |
This parameter is not used but is required to extend ZipArchive.
int | $length | [optional] |
This parameter is not used but is required to extend ZipArchive.
ZipArchive::addFromString | ( | $localname, | |
$contents | |||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)
Add a file to a ZIP archive using its contents string $localname The name of the entry to create.
string | $contents |
The contents to use to create the entry. It is used in a binary safe mode.
ZipArchive::addGlob | ( | $pattern, | |
$flags = 0 , |
|||
array | $options = array() |
||
) |
(PHP 5 >= 5.3.0, PECL zip >= 1.9.0)
Add files from a directory by glob pattern string $pattern A glob pattern against which files will be matched.
int | $flags | [optional] |
A bit mask of glob() flags.
array | $options | [optional] |
An associative array of options. Available options are:
"add_path"
Prefix to prepend when translating to the local path of the file within the archive. This is applied after any remove operations defined by the "remove_path" or "remove_all_path" options.
ZipArchive::addPattern | ( | $pattern, | |
$path = '.' , |
|||
array | $options = array() |
||
) |
(PHP 5 >= 5.3.0, PECL zip >= 1.9.0)
Add files from a directory by PCRE pattern string $pattern A PCRE pattern against which files will be matched.
string | $path | [optional] |
The directory that will be scanned. Defaults to the current working directory.
array | $options | [optional] |
An associative array of options accepted by ZipArchive::addGlob.
ZipArchive::close | ( | ) |
(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)
Close the active archive (opened or newly created) bool TRUE on success or FALSE on failure.
ZipArchive::deleteIndex | ( | $index | ) |
(PHP 5 >= 5.2.0, PECL zip >= 1.5.0)
delete an entry in the archive using its index int $index Index of the entry to delete.
ZipArchive::deleteName | ( | $name | ) |
(PHP 5 >= 5.2.0, PECL zip >= 1.5.0)
delete an entry in the archive using its name string $name Name of the entry to delete.
ZipArchive::extractTo | ( | $destination, | |
$entries = null |
|||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)
Extract the archive contents string $destination Location where to extract the files.
mixed | $entries | [optional] |
The entries to extract. It accepts either a single entry name or an array of names.
ZipArchive::getArchiveComment | ( | $flags = null | ) |
(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)
Returns the Zip archive comment int $flags [optional] If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged comment is returned.
ZipArchive::getCommentIndex | ( | $index, | |
$flags = null |
|||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.4.0)
Returns the comment of an entry using the entry index int $index Index of the entry
int | $flags | [optional] |
If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged comment is returned.
ZipArchive::getCommentName | ( | $name, | |
$flags = null |
|||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.4.0)
Returns the comment of an entry using the entry name string $name Name of the entry
int | $flags | [optional] |
If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged comment is returned.
ZipArchive::getFromIndex | ( | $index, | |
$length = 0 , |
|||
$flags = null |
|||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.3.0)
Returns the entry contents using its index int $index Index of the entry
int | $length | [optional] |
The length to be read from the entry. If 0, then the entire entry is read.
int | $flags | [optional] |
The flags to use to open the archive. the following values may be ORed to it.
ZipArchive::getFromName | ( | $name, | |
$length = 0 , |
|||
$flags = null |
|||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)
Returns the entry contents using its name string $name Name of the entry
int | $length | [optional] |
The length to be read from the entry. If 0, then the entire entry is read.
int | $flags | [optional] |
The flags to use to open the archive. the following values may be ORed to it.
ZipArchive::getNameIndex | ( | $index, | |
$flags = null |
|||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.5.0)
Returns the name of an entry using its index int $index Index of the entry.
int | $flags | [optional] |
If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged name is returned.
ZipArchive::getStatusString | ( | ) |
Returns the status error message, system and/or zip messages string a string with the status message on success or FALSE on failure. 5.2.7
ZipArchive::getStream | ( | $name | ) |
(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)
Get a file handler to the entry defined by its name (read only). string $name The name of the entry to use.
ZipArchive::locateName | ( | $name, | |
$flags = null |
|||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.5.0)
Returns the index of the entry in the archive string $name The name of the entry to look up
int | $flags | [optional] |
The flags are specified by ORing the following values, or 0 for none of them.
ZipArchive::open | ( | $filename, | |
$flags = null |
|||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)
Open a ZIP file archive string $filename The file name of the ZIP archive to open.
int | $flags | [optional] |
The mode to use to open the archive.
Returns TRUE on success or the error code.
File already exists.
Zip archive inconsistent.
Invalid argument.
Malloc failure.
No such file.
Not a zip archive.
Can't open file.
Read error.
Seek error.
ZipArchive::renameIndex | ( | $index, | |
$newname | |||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.5.0)
Renames an entry defined by its index int $index Index of the entry to rename.
string | $newname |
New name.
ZipArchive::renameName | ( | $name, | |
$newname | |||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.5.0)
Renames an entry defined by its name string $name Name of the entry to rename.
string | $newname |
New name.
ZipArchive::setArchiveComment | ( | $comment | ) |
(PHP 5 >= 5.2.0, PECL zip >= 1.4.0)
Set the comment of a ZIP archive string $comment The contents of the comment.
ZipArchive::setCommentIndex | ( | $index, | |
$comment | |||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.4.0)
Set the comment of an entry defined by its index int $index Index of the entry.
string | $comment |
The contents of the comment.
ZipArchive::setCommentName | ( | $name, | |
$comment | |||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.4.0)
Set the comment of an entry defined by its name string $name Name of the entry.
string | $comment |
The contents of the comment.
ZipArchive::setCompressionIndex | ( | $index, | |
$comp_method, | |||
$comp_flags = 0 |
|||
) |
Set the compression method of an entry defined by its index int $index Index of the entry. int $comp_method The compression method. Either ZipArchive::CM_DEFAULT, ZipArchive::CM_STORE or ZipArchive::CM_DEFLATE. int $comp_flags [optional] Compression flags. Currently unused. bool Returns TRUE on success or FALSE on failure. 7.0
ZipArchive::setCompressionName | ( | $name, | |
$comp_method, | |||
$comp_flags = 0 |
|||
) |
Set the compression method of an entry defined by its name http://php.net/manual/en/ziparchive.setcompressionname.php
string | $name | Name of the entry. |
int | $comp_method | The compression method. Either ZipArchive::CM_DEFAULT, ZipArchive::CM_STORE or ZipArchive::CM_DEFLATE. |
int | $comp_flags | [optional] Compression flags. Currently unused. |
ZipArchive::setPassword | ( | $password | ) |
(PHP 5 >= 5.6.0, PECL zip >= 1.12.0)
$password |
ZipArchive::statIndex | ( | $index, | |
$flags = null |
|||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)
Get the details of an entry defined by its index. int $index Index of the entry
int | $flags | [optional] |
ZipArchive::FL_UNCHANGED may be ORed to it to request information about the original file in the archive, ignoring any changes made.
ZipArchive::statName | ( | $name, | |
$flags = null |
|||
) |
(PHP 5 >= 5.2.0, PECL zip >= 1.5.0)
Get the details of an entry defined by its name. string $name Name of the entry
int | $flags | [optional] |
The flags argument specifies how the name lookup should be done. Also, ZipArchive::FL_UNCHANGED may be ORed to it to request information about the original file in the archive, ignoring any changes made.
ZipArchive::unchangeAll | ( | ) |
(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)
Undo all changes done in the archive bool TRUE on success or FALSE on failure.
ZipArchive::unchangeArchive | ( | ) |
(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)
Revert all global changes done in the archive. bool TRUE on success or FALSE on failure.
ZipArchive::unchangeIndex | ( | $index | ) |
(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)
Revert all changes done to an entry at the given index int $index Index of the entry.
ZipArchive::unchangeName | ( | $name | ) |
(PHP 5 >= 5.2.0, PECL zip >= 1.5.0)
Revert all changes done to an entry with the given name. string $name Name of the entry.
ZipArchive::$comment |
Comment for the archive
ZipArchive::$filename |
File name in the file system
ZipArchive::$numFiles |
Number of files in archive
ZipArchive::$status |
Status of the Zip Archive
ZipArchive::$statusSys |
System status of the Zip Archive
const ZipArchive::CHECKCONS = 4 |
Perform additional consistency checks on the archive, and error if they fail. http://php.net/manual/en/zip.constants.php
const ZipArchive::CM_BZIP2 = 12 |
BZIP2 algorithm http://php.net/manual/en/zip.constants.php
const ZipArchive::CM_DEFAULT = -1 |
better of deflate or store. http://php.net/manual/en/zip.constants.php
const ZipArchive::CM_DEFLATE = 8 |
const ZipArchive::CM_DEFLATE64 = 9 |
const ZipArchive::CM_IMPLODE = 6 |
const ZipArchive::CM_PKWARE_IMPLODE = 10 |
PKWARE imploding http://php.net/manual/en/zip.constants.php
const ZipArchive::CM_REDUCE_1 = 2 |
reduced with factor 1 http://php.net/manual/en/zip.constants.php
const ZipArchive::CM_REDUCE_2 = 3 |
reduced with factor 2 http://php.net/manual/en/zip.constants.php
const ZipArchive::CM_REDUCE_3 = 4 |
reduced with factor 3 http://php.net/manual/en/zip.constants.php
const ZipArchive::CM_REDUCE_4 = 5 |
reduced with factor 4 http://php.net/manual/en/zip.constants.php
const ZipArchive::CM_SHRINK = 1 |
const ZipArchive::CM_STORE = 0 |
stored (uncompressed). http://php.net/manual/en/zip.constants.php
const ZipArchive::CREATE = 1 |
Create the archive if it does not exist. http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_CHANGED = 15 |
Entry has been changed http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_CLOSE = 3 |
Closing zip archive failed http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_COMPNOTSUPP = 16 |
Compression method not supported. http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_CRC = 7 |
const ZipArchive::ER_DELETED = 23 |
Entry has been deleted http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_EOF = 17 |
Premature EOF http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_EXISTS = 10 |
File already exists http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_INCONS = 21 |
Zip archive inconsistent http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_INTERNAL = 20 |
Internal error http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_INVAL = 18 |
Invalid argument http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_MEMORY = 14 |
Memory allocation failure http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_MULTIDISK = 1 |
Multi-disk zip archives not supported. http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_NOENT = 9 |
No such file. http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_NOZIP = 19 |
Not a zip archive http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_OK = 0 |
const ZipArchive::ER_OPEN = 11 |
Can't open file http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_READ = 5 |
Read error http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_REMOVE = 22 |
Can't remove file http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_RENAME = 2 |
Renaming temporary file failed. http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_SEEK = 4 |
Seek error http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_TMPOPEN = 12 |
Failure to create temporary file. http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_WRITE = 6 |
Write error http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_ZIPCLOSED = 8 |
Containing zip archive was closed http://php.net/manual/en/zip.constants.php
const ZipArchive::ER_ZLIB = 13 |
Zlib error http://php.net/manual/en/zip.constants.php
const ZipArchive::EXCL = 2 |
Error if archive already exists. http://php.net/manual/en/zip.constants.php
const ZipArchive::FL_COMPRESSED = 4 |
Read compressed data http://php.net/manual/en/zip.constants.php
const ZipArchive::FL_NOCASE = 1 |
Ignore case on name lookup http://php.net/manual/en/zip.constants.php
const ZipArchive::FL_NODIR = 2 |
Ignore directory component http://php.net/manual/en/zip.constants.php
const ZipArchive::FL_UNCHANGED = 8 |
Use original data, ignoring changes. http://php.net/manual/en/zip.constants.php
const ZipArchive::OVERWRITE = 8 |
Always start a new archive, this mode will overwrite the file if it already exists. http://php.net/manual/en/zip.constants.php