MCPcopy Index your code
hub / github.com/nwutils/nw-sample-apps / writeEditorToFile

Function writeEditorToFile

mini-code-edit/editor.js:64–75  ·  view source on GitHub ↗
(theFileEntry)

Source from the content-addressed store, hash-verified

62}
63
64function writeEditorToFile(theFileEntry) {
65 var str = editor.getValue();
66 fs.writeFile(theFileEntry, editor.getValue(), function (err) {
67 if (err) {
68 console.log("Write failed: " + err);
69 return;
70 }
71
72 handleDocumentChange(theFileEntry);
73 console.log("Write completed.");
74 });
75}
76
77var onChosenFileToOpen = function(theFileEntry) {
78 setFile(theFileEntry, false);

Callers 2

onChosenFileToSaveFunction · 0.85
handleSaveButtonFunction · 0.85

Calls 1

handleDocumentChangeFunction · 0.85

Tested by

no test coverage detected