Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function requestFileSystemSuccess(fs) {
- fs.root.getFile('log.txt', {create: true}, function(fileEntry) {
- fileEntry.createWriter(function(fileWriter) {
- fileWriter.onwrite = function(e) {
- console.log('Write completed.');
- };
- fileWriter.onerror = function(e) {
- console.log('Write failed: ' + e.toString());
- };
- var bb = new window.WebKitBlobBuilder();
- bb.append('Lorem Ipsum');
- fileWriter.write(bb.getBlob('text/plain'));
- }, error);
- }, error);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement