I\'m using HTML5 FileWriter API to save the state of my webapp. I have bit of JS that periodically calls FileWriter.write
to do that (so , over time, the
You can truncate and then write with two different FileWriter
objects.
fileEntry.createWriter(function (fileWriter) {
fileWriter.truncate(0);
}, errorHandler);
fileEntry.createWriter(function (fileWriter) {
var blob = new Blob(["New text"], { type: 'text/plain' });
fileWriter.write(blob);
}, errorHandler);