wireUnzipFile() function

Unzips the given ZIP file to the destination directory

This is procedural version of the $files->unzip() method. See that method for more details.

Usage

$array = wireUnzipFile(string $file, string $dst);

Arguments

NameType(s)Description
filestring

ZIP file to extract

dststring

Directory where files should be unzipped into. Directory is created if it doesn’t exist.

Return value

array

Returns an array of filenames (excluding $dst) that were unzipped.

Exceptions

Method can throw exceptions on error:

  • WireException - All error conditions result in WireException being thrown.

See Also


Functions methods and properties

API reference based on ProcessWire core version 3.0.148

Twitter updates

  • This week we’ve got a couple of really useful API-side improvements to the core in 3.0.151, including predefined image settings and static language translation improvements— More
    21 February 2020
  • New post in the blog about all the fun we had driving around a DDOS attack on our forums, how we got it back under control, and what we learned along the way. Plus PW 3.0.150 dev details and links! More
    7 February 2020
  • New post: ProcessWire core updates (January 31, 2020)— More
    31 January 2020

Latest news

  • ProcessWire Weekly #301
    In the 301st issue of ProcessWire Weekly we're going to check out the latest core updates, introduce brand new third party modules RockDaterange and Modules Manager 2, and highlight a brilliant new site of the week. Read on!
    Weekly.pw / 15 February 2020
  • ProcessWire 3.0.151 core updates
    Blog / 21 February 2020
  • Subscribe to weekly ProcessWire news

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer