MCPcopy Index your code
hub / github.com/Acode-Foundation/acode-plugin / loadFile

Function loadFile

pack-zip.js:53–69  ·  view source on GitHub ↗
(root, folder)

Source from the content-addressed store, hash-verified

51 });
52
53function loadFile(root, folder) {
54 const distFiles = fs.readdirSync(folder);
55 distFiles.forEach((file) => {
56
57 const stat = fs.statSync(path.join(folder, file));
58
59 if (stat.isDirectory()) {
60 zip.folder(file);
61 loadFile(path.join(root, file), path.join(folder, file));
62 return;
63 }
64
65 if (!/LICENSE.txt/.test(file)) {
66 zip.file(path.join(root, file), fs.readFileSync(path.join(folder, file)));
67 }
68 });
69}

Callers 1

pack-zip.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected