Extract

Navigation:  Development > Function Reference > Module > Zip >

Extract

Previous pageReturn to chapter overviewNext page

Extract a Zip Archive in a particular location.
 

App::Module('Zip')

   ->setFileName(ZIP File Path)

   ->Compress(Unzip Location);
 

 

Parameter

Type

Description

Zip File Path

Mandatory

Source file path  of zip

Unzip Location

Mandatory

Unzipped location

 

See bellow examples:

 

// Compress file 
App::Module('Zip')
    ->setFileName(App::Config()->baseDir("/uploads/test.zip"))
    ->Extract(App::Config()->baseDir("/uploads/test2"));