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

Method Copy

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

Source from the content-addressed store, hash-verified

183}
184
185func (d *CloudreveV4) Copy(ctx context.Context, srcObj, dstDir model.Obj) error {
186 return d.request(http.MethodPost, "/file/move", func(req *resty.Request) {
187 req.SetBody(base.Json{
188 "uris": []string{srcObj.GetPath()},
189 "dst": dstDir.GetPath(),
190 "copy": true,
191 })
192 }, nil)
193}
194
195func (d *CloudreveV4) Remove(ctx context.Context, obj model.Obj) error {
196 return d.request(http.MethodDelete, "/file", func(req *resty.Request) {

Callers

nothing calls this directly

Calls 2

requestMethod · 0.95
GetPathMethod · 0.65

Tested by

no test coverage detected