Skip to content

Instantly share code, notes, and snippets.

@Deftwun
Created September 25, 2015 03:39
Show Gist options
  • Save Deftwun/b896dc81c6f453ad66fe to your computer and use it in GitHub Desktop.
Save Deftwun/b896dc81c6f453ad66fe to your computer and use it in GitHub Desktop.
/*Does not work as is just the basic idea*/
var fs; //chrome.syncFileSystem.requestFileSystem();
var reader = new FileReader();
var file,data;
fs.root.getFile("somefile.txt",{},function(a){file = a;});
reader.onloadend = function(){data=this.result;};
file.file(function(f){reader.readAsText(f);});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment