MCPcopy Create free account
hub / github.com/Mrs4s/six-cli / CopyFile

Method CopyFile

six_cloud/user.go:99–106  ·  view source on GitHub ↗
(source, target string)

Source from the content-addressed store, hash-verified

97}
98
99func (user *SixUser) CopyFile(source, target string) error {
100 body := `{"source": [{"path": "` + source + `"}],"destination": {"path": "` + target + `"}}`
101 info := gjson.Parse(user.Client.PostJson("https://api.2dland.cn/v2/files/copy", body))
102 if !info.Get("success").Bool() {
103 return errors.New(info.Get("message").Str)
104 }
105 return nil
106}
107
108func (user *SixUser) SearchFilesByName(parent, name string) ([]*SixFile, error) {
109 if parent == "" {

Callers

nothing calls this directly

Calls 1

PostJsonMethod · 0.80

Tested by

no test coverage detected