MCPcopy
hub / github.com/rclone/rclone / restoreBackupFile

Method restoreBackupFile

backend/internxt/internxt.go:1078–1088  ·  view source on GitHub ↗

restoreBackupFile restores a backup file after upload failure

(ctx context.Context, backupUUID, origName, origType string)

Source from the content-addressed store, hash-verified

1076
1077// restoreBackupFile restores a backup file after upload failure
1078func (o *Object) restoreBackupFile(ctx context.Context, backupUUID, origName, origType string) {
1079 if backupUUID == "" {
1080 return
1081 }
1082
1083 _ = o.f.pacer.Call(func() (bool, error) {
1084 err := files.RenameFile(ctx, o.f.cfg, backupUUID,
1085 o.f.opt.Encoding.FromStandardName(origName), origType)
1086 return o.f.shouldRetry(ctx, err)
1087 })
1088}
1089
1090// Remove deletes a file
1091func (o *Object) Remove(ctx context.Context) error {

Callers 1

UpdateMethod · 0.95

Calls 4

RenameFileMethod · 0.80
FromStandardNameMethod · 0.65
CallMethod · 0.45
shouldRetryMethod · 0.45

Tested by

no test coverage detected