I'm having an issue on Android (not tested on other platforms) where I would like to use the cordova file API to read a file from the /www folder. There are conflicting pieces of information on the internet about whether this is possible or not. I've followed an example like:
window.resolveLocalFileSystemURL(cordova.file.applicationDirectory + "www/index.html", gotFile, fail);
However I'm getting error 1 (file not found). I can use AJAX to retrieve the file I need but it doesn't suit my use case. I want to query a directory in the /www folder and read a dynamically named file. Any ideas?
I'd like to have an updated answer, as the one I've seen is over 1 year old: Can you read files in the www folder using PhoneGap.'s JS methods?
Thanks in advance.