MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / listTree

Function listTree

Support/SingleFileLibs/javascript/cli.js:86–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84 // Use system-appropriate line endings
85 lineEndings: process.platform === 'win32' ? 'crlf' : 'lf',
86 async listTree() {
87 const roots = [
88 join(repoRoot, 'Libraries'),
89 join(repoRoot, 'LibrariesExtra'),
90 join(repoRoot, 'Support', 'SingleFileLibs'), // for per-library order JSON files
91 ];
92 const files = [];
93 for (const r of roots) {
94 if (!existsSync(r)) continue;
95 files.push(...listFilesRecursive(r));
96 }
97 const rel = files.map(f => ({ type: 'blob', path: f.substring(repoRoot.length + 1).replaceAll('\\', '/') }));
98 return rel;
99 },
100 async readFile(_ref, path) {
101 return await readText(join(repoRoot, path));
102 },

Callers

nothing calls this directly

Calls 3

listFilesRecursiveFunction · 0.85
joinFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected