MCPcopy Index your code
hub / github.com/TruthHun/BookStack / CopyFile

Method CopyFile

models/store/oss.go:285–293  ·  view source on GitHub ↗

CopyDir 拷贝文件夹

(sourceFile, targetFile string)

Source from the content-addressed store, hash-verified

283
284// CopyDir 拷贝文件夹
285func (o *Oss) CopyFile(sourceFile, targetFile string) (err error) {
286 var bucket, _ = o.GetBucket()
287 sourceFile = strings.TrimLeft(sourceFile, "./")
288 targetFile = strings.TrimLeft(targetFile, "./")
289 if _, err = bucket.CopyObject(sourceFile, targetFile); err != nil {
290 beego.Error("copy", sourceFile, "==>", targetFile, err.Error())
291 }
292 return
293}
294
295// Down2local 下载文件夹下的文件到本地
296func (o *Oss) Down2local(sourceDir, targetDir string) (err error) {

Callers 1

CopyMethod · 0.45

Calls 1

GetBucketMethod · 0.95

Tested by

no test coverage detected