MCPcopy
hub / github.com/rclone/rclone / copy

Method copy

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

Source from the content-addressed store, hash-verified

1133}
1134
1135func (r *run) copy(t *testing.T, rootFs fs.Fs, src, dst string) error {
1136 var err error
1137
1138 if rootFs.Features().Copy != nil {
1139 obj, err := rootFs.NewObject(context.Background(), src)
1140 if err != nil {
1141 return err
1142 }
1143 _, err = rootFs.Features().Copy(context.Background(), obj, dst)
1144 if err != nil {
1145 return err
1146 }
1147 } else {
1148 t.Logf("Copy not supported by %v", rootFs)
1149 return errNotSupported
1150 }
1151
1152 return err
1153}
1154
1155func (r *run) modTime(t *testing.T, rootFs fs.Fs, src string) (time.Time, error) {
1156 var err error

Calls 4

LogfMethod · 0.80
FeaturesMethod · 0.65
NewObjectMethod · 0.65
CopyMethod · 0.65

Tested by

no test coverage detected