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

Method resolveR2Prefix

packages/shell/src/filesystem.ts:378–388  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

376 }
377
378 private resolveR2Prefix(): string {
379 if (this.r2Prefix !== undefined) return this.r2Prefix;
380 const name = this._name;
381 if (!name) {
382 throw new Error(
383 "[Workspace] R2 is configured but no r2Prefix was provided and no name is available. " +
384 "Either pass r2Prefix in WorkspaceOptions or provide a name."
385 );
386 }
387 return name;
388 }
389
390 private r2Key(filePath: string): string {
391 return `${this.resolveR2Prefix()}/${this.namespace}${filePath}`;

Callers 1

r2KeyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected