MCPcopy
hub / github.com/foambubble/foam / list

Method list

packages/foam-cli/src/test/test-utils.ts:33–40  ·  view source on GitHub ↗
(pattern?: string)

Source from the content-addressed store, hash-verified

31 }
32
33 async list(pattern?: string): Promise<URI[]> {
34 const paths = Array.from(this.files.keys());
35 if (!pattern) {
36 return paths.map(p => URI.parse(p, 'file'));
37 }
38 const matched = micromatch(paths, [`**/${pattern}`]);
39 return matched.map(p => URI.parse(p, 'file'));
40 }
41
42 async read(uri: URI): Promise<string | null> {
43 return this.files.get(uri.path) ?? null;

Callers 4

runGrepCommandFunction · 0.45
runMcpCommandFunction · 0.45
runGraphCommandFunction · 0.45
createPublishContextFunction · 0.45

Calls 3

keysMethod · 0.80
mapMethod · 0.65
parseMethod · 0.45

Tested by

no test coverage detected