MCPcopy
hub / github.com/anomalyco/models.dev / tomlFiles

Function tomlFiles

packages/core/src/sync/index.ts:565–578  ·  view source on GitHub ↗
(root: string, dir = "")

Source from the content-addressed store, hash-verified

563}
564
565async function tomlFiles(root: string, dir = "") {
566 const result: Array<{ file: string; symlink: boolean }> = [];
567
568 for (const entry of await readdir(path.join(root, dir), { withFileTypes: true })) {
569 const file = path.join(dir, entry.name).split(path.sep).join("/");
570 if (entry.isDirectory()) {
571 result.push(...await tomlFiles(root, file));
572 } else if (entry.name.endsWith(".toml") && (entry.isFile() || entry.isSymbolicLink())) {
573 result.push({ file, symlink: entry.isSymbolicLink() });
574 }
575 }
576
577 return result;
578}
579
580function summarize(
581 provider: { id: string; name: string },

Callers 2

syncProviderFunction · 0.85
readExistingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected