MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / readOneFile

Function readOneFile

scripts/useless-key-scanner.mjs:141–151  ·  view source on GitHub ↗
(filePath = "")

Source from the content-addressed store, hash-verified

139 console.log("Create new thread ID:", threadId, "\tFiles:", filesPath.length);
140
141 async function readOneFile(filePath = "") {
142 const fileContent = await fs.promises.readFile(filePath, "utf-8");
143 for (const key of langKeys.keys()) {
144 if (fileContent.includes(key)) {
145 parentPort?.postMessage({
146 type: "key",
147 data: key
148 });
149 }
150 }
151 }
152
153 const promises = [];
154 for (const filePath of filesPath) {

Callers 1

workerFunction · 0.85

Calls 2

keysMethod · 0.80
readFileMethod · 0.45

Tested by

no test coverage detected