WPDev.one
Core Function
View Source on Trac ↗

_unzip_file_pclzip()

_unzip_file_pclzip( mixed $file, mixed $to, mixed $needed_dirs = array() )

Attempts to unzip an archive using the PclZip library.

Parameters 2 required

Name / Type Description
$file
string

Full path and filename of ZIP archive.

Required
$to
string

Full path on the filesystem to extract archive to.

Required
$needed_dirs
string[]

A partial list of required folders needed to be created.

Return Value

((true)
| WP_Error) True on success, WP_Error on failure.

Function Information

Since Version
3.0.0
Source File
wp-admin/includes/file.php
Advertisement