connect sftp and get csv file from folder and then import into sugarcrm or read data from csv and update into sugarcrm

Hi All,

Sugarcrm version 12

Can you please help me with how to connect sftp using php code and get csv file from sftp folder and then import into sugarcrm or read data from csv and update into sugarcrm?

Thanks,

Shreya