PhoneGap download image to a specific folder
<p>I am building PhoneGap based application for iOS platform.<br>
I want to download few image files to a specific directory.   </p>

<p>I want to store downloaded images in folder <code>www/my_img/</code>    </p>

<p>So that in my app I can further use this image as:   </p>

<pre><code>&lt;img src="my_img/downloaded.jpg" width="100px" height="100px"&gt;
</code></pre>

<p>I am using PhoneGap plugin for downloading images:   </p>

<pre><code>var url = 'http://myServer.com/img.jpg';
var filePath = 'www/my_img/';
var fileTransfer = new FileTransfer();
var uri = encodeURI(url);

fileTransfer.download(
    uri,
    filePath,
    function(entry) {
        console.log("download complete: " + entry.fullPath);
    },
    function(error) {
        console.log("download error source " + error.source);
        console.log("download error target " + error.target);
        console.log("upload error code" + error.code);
    },
    false,
    {
        headers: {
        }
    }
);
</code></pre>

<p>But problem is image is not getting saved in specified folder.<br>
How can I save downloaded image in "www/my_img/" folder?</p>