ngCordova $cordovaFile save file to Camera Roll

Is there any way to download a file from the internet (png) and save it to the camera roll? I was looking at $cordovaFile and it looks like what I need:

// parameters: source, filePath, trust all hosts (boolean), options
    .downloadFile(source, filePath, true, options)
    .then(function(result) {
      // Success! 
    }, function(err) {
      // Error
    }, function (progress) {
      // constant progress updates

but how do I actually get my filePath?

The easiest way is to use a Cordova file path ‘cdvfile://localhost/…’. I found these release notes particularly helpful:

For the file system types, I just dug into the plugin sources. There’s a helpful table here too: