I\'m experimenting with the HTML5 File API, and I\'m needing to use a method which I don\'t know enough about (simply because it\'s hardly documented anywhere).
I\'m tal
You need to be more async'y. :)
fileEntry.createWriter(function(fileWriter) {
fileWriter.onwriteend = function(trunc) {
fileWriter.onwriteend = null; // Avoid an infinite loop.
// Create a new Blob and write it to log.txt.
var bb = new BlobBuilder(); // Note: window.WebKitBlobBuilder in Chrome 12.
bb.append('Hello World');
fileWriter.write(bb.getBlob('text/plain'));
}
fileWriter.seek(fileWriter.length); // Start write position at EOF.
fileWriter.truncate(1);
}, errorHandler);