IZip
- Type
- Interface
- Namespace
- Craft
- Implemented by
- Craft\PclZip, Craft\ZipArchive
- Since
- 1.0
Interface IZip
See also http://craftcms.com
View source (opens new window)
# Public Methods
Method | Description |
---|---|
add() | Will add either a file or a folder to an existing zip file. If it is a folder, it will add the contents recursively. |
unzip() | |
zip() |
# add()
Will add either a file or a folder to an existing zip file. If it is a folder, it will add the contents recursively.
View source (opens new window)
Arguments
$sourceZip
(string (opens new window)) – The zip file to be added to.$filePath
(string (opens new window)) – A file or a folder to add. If it is a folder, it will recursively add the contents of the folder to the zip.$basePath
(string (opens new window)) – The root path of the file(s) to be added that will be removed before adding.$pathPrefix
(string (opens new window)) – A path to be prepended to each file before it is added to the zip.
Returns
Signature
public abstract boolean add ( $sourceZip, $filePath, $basePath, $pathPrefix = null )
# unzip()
Signature
public abstract mixed unzip ( $sourceZip, $destFolder )
# zip()
Signature
public abstract mixed zip ( $sourceFolder, $destZip )