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

Method Rename

drivers/cloudreve_v4/driver.go:175–183  ·  view source on GitHub ↗
(ctx context.Context, srcObj model.Obj, newName string)

Source from the content-addressed store, hash-verified

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) {
177 req.SetBody(base.Json{
178 "new_name": newName,
179 "uri": srcObj.GetPath(),
180 })
181 }, nil)
182
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) {

Callers

nothing calls this directly

Calls 2

requestMethod · 0.95
GetPathMethod · 0.65

Tested by

no test coverage detected