(source, target string)
| 97 | } |
| 98 | |
| 99 | func (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 | |
| 108 | func (user *SixUser) SearchFilesByName(parent, name string) ([]*SixFile, error) { |
| 109 | if parent == "" { |