MCPcopy Create free account
hub / github.com/curiores/SerialAnalyzer / writeDataIfRecording

Function writeDataIfRecording

src/Utils/DataRecording.js:42–54  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

40}
41
42export function writeDataIfRecording(data){
43 try{
44 if(GlobalSettings.record.recording && GlobalSettings.record.directory !== null){
45 let filename = path.join(GlobalSettings.record.directory,GlobalSettings.record.outputFilename);
46 let dataWithNewline = data + "\r\n";
47 ipcRenderer.invoke('fse','appendFile',filename,dataWithNewline);
48 }
49 }
50 catch(e){
51 console.log("data recording error...")
52 console.log(e);
53 }
54}

Callers 1

addDataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected