Created
December 1, 2014 14:19
-
-
Save westc/9eaf41b759f02a76807c to your computer and use it in GitHub Desktop.
Write file as text in Chrome app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function writeFileAsText(fileEntry, text, opt_callback) { | |
| fileEntry.createWriter(function(writer) { | |
| writer.onwriteend = opt_callback; | |
| writer.write(new Blob([text], {type: 'text/plain'})); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment