Method
Rename
(ctx context.Context, srcObj model.Obj, newName string)
Source from the content-addressed store, hash-verified
| 173 | } |
| 174 | |
| 175 | func (d *CloudreveV4) Rename(ctx context.Context, srcObj model.Obj, newName string) error { |
| 176 | return d.request(http.MethodPost, "/file/create", func(req *resty.Request) { |
| 177 | req.SetBody(base.Json{ |
| 178 | "new_name": newName, |
| 179 | "uri": srcObj.GetPath(), |
| 180 | }) |
| 181 | }, nil) |
| 182 | |
| 183 | } |
| 184 | |
| 185 | func (d *CloudreveV4) Copy(ctx context.Context, srcObj, dstDir model.Obj) error { |
| 186 | return d.request(http.MethodPost, "/file/move", func(req *resty.Request) { |
Callers
nothing calls this directly
Tested by
no test coverage detected