MCPcopy Create free account
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 if (stat.isDirectory()) {
52 zip.folder(file);
53 loadFile(path.join(root, file), path.join(folder, file));
54 return;
55 }
56
57 if (!/LICENSE.txt/.test(file)) {
58 zip.file(path.join(root, file), fs.readFileSync(path.join(folder, file)));
59 }
60 });
61}
62
63function resolveMetadataFile(configuredPath, fallbacks) {
64 if (configuredPath) {
65 const file = path.join(__dirname, configuredPath);
66 if (!fs.existsSync(file)) {
67 throw new Error(`Missing plugin metadata file: ${configuredPath}`);
68 }
69 return file;
70 }
71
72 for (const fallback of fallbacks) {

Callers 1

pack-zip.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected