Permalink
Browse files

Fixes #163

  • Loading branch information...
1 parent 7d30b49 commit 2014f327a556f7aec6bee2d747de702c56a64213 @ebidel ebidel committed Aug 21, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 content/tutorials/file/filesystem/en/index.html
View
14 content/tutorials/file/filesystem/en/index.html
@@ -300,9 +300,9 @@ <h3 id="toc-file-writing">Writing to a file</h3>
};
// Create a new Blob and write it to log.txt.
- var bb = new BlobBuilder(); // Note: window.WebKitBlobBuilder in Chrome 12.
- bb.append('Lorem Ipsum');
- <b>fileWriter.write</b>(bb.getBlob('text/plain'));
+ var blob = new Blob(['Lorem Ipsum'], {type: 'text/plain'});
+
+ <b>fileWriter.write</b>(blob);
}, errorHandler);
@@ -335,9 +335,9 @@ <h3 id="toc-file-appending">Appending data to a file</h3>
<b>fileWriter.seek(fileWriter.length); // Start write position at EOF.</b>
// Create a new Blob and write it to log.txt.
- var bb = new BlobBuilder(); // Note: window.WebKitBlobBuilder in Chrome 12.
- bb.append('Hello World');
- <b>fileWriter.write</b>(bb.getBlob('text/plain'));
+ var blob = new Blob(['Hello World'], {type: 'text/plain'});
+
+ <b>fileWriter.write</b>(blob);
}, errorHandler);
@@ -366,7 +366,7 @@ <h3 id="toc-file-user-selected">Duplicating user-selected files</h3>
// Capture current iteration's file in local scope for the getFile() callback.
(function(f) {
- fs.root.getFile(<b>file.name</b>, {create: true, exclusive: true}, function(fileEntry) {
+ fs.root.getFile(<b>f.name</b>, {create: true, exclusive: true}, function(fileEntry) {
fileEntry.createWriter(function(fileWriter) {
<b>fileWriter.write(f);</b> // Note: write() can take a File or Blob object.
}, errorHandler);

0 comments on commit 2014f32

Please sign in to comment.