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

Method getFilePaths

packages/shell/src/memory.ts:449–459  ·  view source on GitHub ↗
(pattern: string)

Source from the content-addressed store, hash-verified

447 }
448
449 private async getFilePaths(pattern: string): Promise<string[]> {
450 const paths = await this.glob(pattern);
451 const files: string[] = [];
452 for (const path of paths) {
453 const stat = await this.lstat(path);
454 if (stat?.type === "file") {
455 files.push(path);
456 }
457 }
458 return files;
459 }
460
461 private async deleteFile(path: string): Promise<void> {
462 await this.fs.rm(path, { force: true });

Callers 2

searchFilesMethod · 0.95
replaceInFilesMethod · 0.95

Calls 2

globMethod · 0.95
lstatMethod · 0.95

Tested by

no test coverage detected