lib/Ext/device/filesystem/Cordova.js
function(config) {
                var fileTransfer = new FileTransfer();
                fileTransfer.download(
                    encodeURI(config.source),
                    this.path,
                    config.success,
                    config.failure,
                    config.trustAllHosts || false,
                    config.options || {}
                );

                return fileTransfer;
            }
function(config) {
                var fileTransfer = new FileTransfer();
                fileTransfer.download(
                    encodeURI(config.source),
                    this.path,
                    config.success,
                    config.failure,
                    config.trustAllHosts || false,
                    config.options || {}
                );

                return fileTransfer;
            }
Downloads a file from the server saving it into the Local File System

@param {Object} config

@param {String} config.source
URL of file to download

@param {Boolean} config.trustAllHosts
if true it will accept all security certificates. Defaults to false

@param {Object} config.options
Header parameters (Auth, etc)

{
headers: {
"Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
}
}

@param {Function} config.success
The function called when the File is downloaded successfully

@param {Function} config.success.entry
File Entry object of the downloaded file

@param {Function} config.failure
The function called when the File download fails

@param {FileError} config.failure.error

@returns {FileTransfer}