unzip_file


unzip_file ( $file, $to )

Parameters:
  • (string) file Full path and filename of ZIP archive.
  • (string) to Full path on the filesystem to extract archive to.
Returns:
  • (true|WP_Error) True on success, WP_Error on failure.
Defined at:

Description

Unzips a specified ZIP file to a location on the filesystem via the WordPress Filesystem Abstraction.Assumes that WP_Filesystem() has already been called and set up. Does not extract a root-level __MACOSX directory, if present. Attempts to increase the PHP memory limit to 256M before uncompressing. However, the most memory required shouldn't be much larger than the archive itself.

Related Functions

_unzip_file_pclzip, _unzip_file_ziparchive, list_files, did_filter, current_filter

Top Google Results

User discussions

wpseek mobile