MCPcopy Index your code
hub / github.com/hokein/electron-sample-apps / writeEditorToFile

Function writeEditorToFile

mini-code-editor/editor.js:57–68  ·  view source on GitHub ↗
(theFileEntry)

Source from the content-addressed store, hash-verified

55}
56
57function writeEditorToFile(theFileEntry) {
58 var str = editor.getValue();
59 fs.writeFile(theFileEntry, editor.getValue(), function (err) {
60 if (err) {
61 console.log("Write failed: " + err);
62 return;
63 }
64
65 handleDocumentChange(theFileEntry);
66 console.log("Write completed.");
67 });
68}
69
70var onChosenFileToOpen = function(theFileEntry) {
71 console.log(theFileEntry);

Callers 2

onChosenFileToSaveFunction · 0.85
handleSaveButtonFunction · 0.85

Calls 1

handleDocumentChangeFunction · 0.85

Tested by

no test coverage detected