PhoneGap - How to create a new file in assets/www/example/hallo.text
my error is "Error fileSystem"
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
function fail() {
confirm('Error fileSystem');
}
function gotFS(fileSystem) {
fileSystem.root.getFile("file:///android_asset/www/example/hallo.text", {
create: true
}, gotFileEntry, fail);
}
function gotFileEntry(fileEntry) {
fileEntry.createWriter(gotFileWriter, fail);
}
function gotFileWriter(writer) {
writer.write("hallo");
}