MCPcopy Create free account
hub / github.com/cloudflare/computer / grep

Method grep

packages/computer/src/stub.ts:212–222  ·  view source on GitHub ↗
(pattern: string, path: string, options: GrepOptions = {})

Source from the content-addressed store, hash-verified

210 }
211
212 grep(pattern: string, path: string, options: GrepOptions = {}): Promise<WorkspaceGrepMatch[]> {
213 return withSpan(
214 this.#ws.observer,
215 "workspace.fs.grep",
216 { "workspace.fs.path": path, "workspace.fs.pattern": pattern },
217 () => this.#ws.fs.grep(pattern, path, options),
218 (span, outcome) => {
219 if (outcome.ok) span.setAttribute("workspace.fs.matches", outcome.value.length);
220 },
221 );
222 }
223
224 // --- Mutations ---------------------------------------------------
225

Callers

nothing calls this directly

Calls 3

withSpanFunction · 0.85
grepMethod · 0.65
setAttributeMethod · 0.65

Tested by

no test coverage detected