function readFile() {
File.file(function(file) {
var reader = new FileReader();
reader.onloadend = function() {
return this.result;
};
reader.readAsText(file);
});
}
function InitFile(name) {
chrome.syncFileSystem.requestFileSystem(function(fs) {
fileSystem = fs;
fileSystem.root.getFile(name, {create: true}, function(file) {
File = file;
readFile();
});
});
}