MCPcopy Create free account
hub / github.com/cloudflare/agents / searchFiles

Method searchFiles

packages/shell/src/memory.ts:207–218  ·  view source on GitHub ↗
(
    pattern: string,
    query: string,
    options?: StateSearchOptions
  )

Source from the content-addressed store, hash-verified

205 }
206
207 async searchFiles(
208 pattern: string,
209 query: string,
210 options?: StateSearchOptions
211 ): Promise<StateFileSearchResult[]> {
212 const paths = await this.getFilePaths(pattern);
213 return collectFileSearchResults(
214 paths,
215 this.readFile.bind(this),
216 (content) => searchTextContent(content, query, options)
217 );
218 }
219
220 async replaceInFile(
221 path: string,

Callers

nothing calls this directly

Calls 3

getFilePathsMethod · 0.95
collectFileSearchResultsFunction · 0.90
searchTextContentFunction · 0.90

Tested by

no test coverage detected