MCPcopy Create free account
hub / github.com/scriptscat/scriptcat / getDirUrl

Method getDirUrl

packages/filesystem/s3/s3.ts:266–273  ·  view source on GitHub ↗

* 获取当前目录的 URL * 自定义 endpoint 返回 endpoint + bucket/prefix 路径 * AWS S3 返回控制台 URL

()

Source from the content-addressed store, hash-verified

264 * AWS S3 返回控制台 URL
265 */
266 async getDirUrl(): Promise<string> {
267 const prefix = this.basePath === "/" ? "" : this.basePath.substring(1);
268 if (this.client.hasCustomEndpoint()) {
269 const url = this.client.getEndpointUrl();
270 return `${url}/${this.bucket}/${prefix}`;
271 }
272 return `https://s3.console.aws.amazon.com/s3/buckets/${this.bucket}?prefix=${encodeURIComponent(prefix)}&region=${this.client.getRegion()}`;
273 }
274}

Callers

nothing calls this directly

Calls 3

hasCustomEndpointMethod · 0.80
getEndpointUrlMethod · 0.80
getRegionMethod · 0.80

Tested by

no test coverage detected