mGet

Navigation:  Development > Function Reference > Module > Ftp >

mGet

Previous pageReturn to chapter overviewNext page

Download a folder with contain.

 

App::Module('Ftp')->mPut(Remote Directory,Local Directory,[Continuous]);
 

Return downloaded file size.
 

Parameter

Type

Description

Remote Directory

Mandatory

Remote file name to download

Local File

Mandatory

Local file name to download

Continous

Optional

Reconnect if connection break.(true,false)

 

return true if success

 

See bellow examples:

 
$Ftp->Connect('ftp.example.com');
$Ftp->Login('username','********');
 
// Download file 
$size = $Ftp->mPut(
    'myfolder',

    app::Config()->baseDir("/uploads/myfolder"),
);