CRM_Utils_Zip
class CRM_Utils_Zip
Utilities for working with zip files
Methods
static mixed
findBaseDirName(ZipArchive $zip)
Given a zip file which contains a single root directory, determine the root's name.
static array(string)
findBaseDirs(ZipArchive $zip)
Given a zip file, find all directory names in the root
static string|bool
guessBasedir(ZipArchive $zip, $expected)
Determine the name of the folder within a zip.
static bool
createTestZip(string $zipName, array $dirs, array $files)
An inefficient helper for creating a ZIP file from data in memory.
Details
at line 47
static mixed
findBaseDirName(ZipArchive $zip)
Given a zip file which contains a single root directory, determine the root's name.
at line 80
static array(string)
findBaseDirs(ZipArchive $zip)
Given a zip file, find all directory names in the root
at line 104
static string|bool
guessBasedir(ZipArchive $zip, $expected)
Determine the name of the folder within a zip.
at line 133
static bool
createTestZip(string $zipName, array $dirs, array $files)
An inefficient helper for creating a ZIP file from data in memory.
This is only intended for building temp files for unit-testing.