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

Method Move

drivers/ftps/driver.go:80–88  ·  view source on GitHub ↗
(ctx context.Context, srcObj, dstDir model.Obj)

Source from the content-addressed store, hash-verified

78}
79
80func (d *FTPS) Move(ctx context.Context, srcObj, dstDir model.Obj) error {
81 if err := d.login(); err != nil {
82 return err
83 }
84 return d.conn.Rename(
85 encode(srcObj.GetPath(), d.Encoding),
86 encode(stdpath.Join(dstDir.GetPath(), srcObj.GetName()), d.Encoding),
87 )
88}
89
90func (d *FTPS) Rename(ctx context.Context, srcObj model.Obj, newName string) error {
91 if err := d.login(); err != nil {

Callers

nothing calls this directly

Calls 5

loginMethod · 0.95
encodeFunction · 0.70
RenameMethod · 0.65
GetPathMethod · 0.65
GetNameMethod · 0.65

Tested by

no test coverage detected