MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / readFile

Function readFile

gqftbz.js:598–616  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

596 }
597}
598function readFile() {
599 const fs = require('fs');
600 let file = fs.existsSync("./gqft.json");
601 if (!file) { console.log("./gqft.json" + "文件不存在"); return [] }
602 return new Promise((resolve, reject) => {
603 fs.readFile('./gqft.json', 'utf8', function (err, data) {
604 if (err) {
605 reject(err);
606 } else {
607 try {
608 data = JSON.parse(data);
609 } catch (error) {
610
611 }
612 resolve(data);
613 }
614 });
615 });
616}
617function writeFile(data) {
618 const fs = require('fs');
619 return new Promise((resolve, reject) => {

Callers 3

decryptMethod · 0.85
refresh_tokenMethod · 0.85
checkEnvFunction · 0.85

Calls 2

readFileMethod · 0.80
logMethod · 0.45

Tested by

no test coverage detected