MCPcopy
hub / github.com/rclone/rclone / move

Method move

backend/cache/cache_internal_test.go:1115–1133  ·  view source on GitHub ↗
(t *testing.T, rootFs fs.Fs, src, dst string)

Source from the content-addressed store, hash-verified

1113}
1114
1115func (r *run) move(t *testing.T, rootFs fs.Fs, src, dst string) error {
1116 var err error
1117
1118 if rootFs.Features().Move != nil {
1119 obj1, err := rootFs.NewObject(context.Background(), src)
1120 if err != nil {
1121 return err
1122 }
1123 _, err = rootFs.Features().Move(context.Background(), obj1, dst)
1124 if err != nil {
1125 return err
1126 }
1127 } else {
1128 t.Logf("Move not supported by %v", rootFs)
1129 return errNotSupported
1130 }
1131
1132 return err
1133}
1134
1135func (r *run) copy(t *testing.T, rootFs fs.Fs, src, dst string) error {
1136 var err error

Calls 4

LogfMethod · 0.80
FeaturesMethod · 0.65
NewObjectMethod · 0.65
MoveMethod · 0.65

Tested by

no test coverage detected