MCPcopy
hub / github.com/cortexlabs/cortex / IsS3PathFile

Method IsS3PathFile

pkg/lib/aws/s3.go:230–249  ·  view source on GitHub ↗
(s3Path string, s3Paths ...string)

Source from the content-addressed store, hash-verified

228}
229
230func (c *Client) IsS3PathFile(s3Path string, s3Paths ...string) (bool, error) {
231 allS3Paths := append(s3Paths, s3Path)
232 for _, s3Path := range allS3Paths {
233 bucket, prefix, err := SplitS3Path(s3Path)
234 if err != nil {
235 return false, err
236 }
237
238 exists, err := c.IsS3File(bucket, prefix)
239 if err != nil {
240 return false, err
241 }
242
243 if !exists {
244 return false, nil
245 }
246 }
247
248 return true, nil
249}
250
251func (c *Client) IsS3File(bucket string, fileKey string, fileKeys ...string) (bool, error) {
252 allFileKeys := append(fileKeys, fileKey)

Callers

nothing calls this directly

Calls 2

IsS3FileMethod · 0.95
SplitS3PathFunction · 0.85

Tested by

no test coverage detected