Understanding Mission handling code

Hi,
I am trying to send a file to pixhawk and save it on sd card. I am going through the code to understand the mission file uploading on pixhawk and how received file is written to eeprom(currently).
Can someone help me with understanding the process.

Thanks

I think FTP support is only available in master branch.