EQdkp Plus Navigation:   Home  |   Forum  |   Wiki  |   Translate  |   Bugtracker  |   WebSVN  |  USVN

Zip

From EQdkp Plus Wiki

Creating new zip-Files

$file = $pfh->FilePath('test.zip', 'eqdkp');
$archive = new mmocms_zip($file); //Init
$archive->add($eqdkp_root_path.'index.php'); //Single File
$archive->add($eqdkp_root_path.'/plugins/'); //Directory with all subdirectorys
$archive->add(array($eqdkp_root_path.'viewnews.php', $eqdkp_root_path.'viewcharacter.php')); //Array with filenames
$archive->delete($eqdkp_root_path.'index.php'); //Delete Single File
$archive->add($eqdkp_root_path.'/portal/'); //Delete Directory
...
$archive->create(); //Creates the archive

Unpacking zip-Files

$file = $pfh->FilePath('test.zip', 'eqdkp');
$archive = new mmocms_zip($file); //Init
$archive->extract($eqdkp_root_path.'templates/', array('viewnews.php', 'viewcharcter.php')); //Extracts only the two given files from the archive
$archive->extract($eqdkp_root_path.'templates/test/'); //Extracts all files