Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Fixes #163
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Aug 21, 2012
1 parent 7d30b49 commit 2014f32
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions content/tutorials/file/filesystem/en/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2014f32

Please sign in to comment.