I have a iphone app built in phonegap framwork, I am using Filesystem to access remote file but I have problem finding a solution.
I have used following code to list drectories which is working
window.requestFileSystem(
LocalFileSystem.TEMPORARY, 0,
function onFileSystemSuccess(fileSystem) {
fileSystem.root.getDirectory('test/', {create: false, exclusive: false},function(dirEntry){
var directoryReader = dirEntry.createReader();
directoryReader.readEntries(function(entries){
for ( i=entries.length-1; i>=0; i--) {
(entries[i].name.indexOf(".jpg") != -1) {
if(entries[i].isFile == true)
k++;
}
}
}
},fail);
},
fail);
});
but if i replace 'test/' with the remote server url I'am getting error. Please help me out. I want to list files and the download all the files from server to local folder on Iphone.