MCPcopy Create free account
hub / github.com/TruthHun/DocHub / IsExist

Method IsExist

models/CloudStoreModel.go:226–244  ·  view source on GitHub ↗

err 返回 nil,表示文件存在,否则表示文件不存在

(object string)

Source from the content-addressed store, hash-verified

224
225// err 返回 nil,表示文件存在,否则表示文件不存在
226func (c *CloudStore) IsExist(object string) (err error) {
227 switch c.StoreType {
228 case StoreCos:
229 err = c.client.(*CloudStore2.COS).IsExist(object)
230 case StoreOss:
231 err = c.client.(*CloudStore2.OSS).IsExist(object)
232 case StoreBos:
233 err = c.client.(*CloudStore2.BOS).IsExist(object)
234 case StoreObs:
235 err = c.client.(*CloudStore2.OBS).IsExist(object)
236 case StoreUpyun:
237 err = c.client.(*CloudStore2.UpYun).IsExist(object)
238 case StoreMinio:
239 err = c.client.(*CloudStore2.MinIO).IsExist(object)
240 case StoreQiniu:
241 err = c.client.(*CloudStore2.QINIU).IsExist(object)
242 }
243 return
244}
245
246func GetImageFromCloudStore(picture string, ext ...string) (link string) {
247 cs, err := NewCloudStore(false)

Callers 2

PingTestMethod · 0.95
CacheGetFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected