Using the Cordova file plugin how can I write files to a folder within the app? I realise I can't use the www folder but how can I create a folder within the app to write to? Ideally where it cannot be opened by a third party when compiled.
The code I am using is as follows:
function createFile() {
var type = window.TEMPORARY;
var size = 5*1024*1024;
window.requestFileSystem(type, size, successCallback, errorCallback)
function successCallback(fs) {
fs.root.getFile('log.txt', {create: true, exclusive: true}, function(fileEntry) {
alert('File creation successfull!')
}, errorCallback);
}
function errorCallback(error) {
alert("ERROR: " + error.code)
}
}
Thanks in advance;