MCPcopy
hub / github.com/AlistGo/alist / Move

Method Move

drivers/cloudreve_v4/driver.go:165–173  ·  view source on GitHub ↗
(ctx context.Context, srcObj, dstDir model.Obj)

Source from the content-addressed store, hash-verified

163}
164
165func (d *CloudreveV4) Move(ctx context.Context, srcObj, dstDir model.Obj) error {
166 return d.request(http.MethodPost, "/file/move", func(req *resty.Request) {
167 req.SetBody(base.Json{
168 "uris": []string{srcObj.GetPath()},
169 "dst": dstDir.GetPath(),
170 "copy": false,
171 })
172 }, nil)
173}
174
175func (d *CloudreveV4) Rename(ctx context.Context, srcObj model.Obj, newName string) error {
176 return d.request(http.MethodPost, "/file/create", func(req *resty.Request) {

Callers

nothing calls this directly

Calls 2

requestMethod · 0.95
GetPathMethod · 0.65

Tested by

no test coverage detected