Every file is written to .vcom-part-<rand>-<name>, closed (a Close error fails the item: N-P2-6), chmod/chtimes'ed and only then renamed over the target, so a failed or cancelled overwrite keeps the old file (N-P0-4) and leaves no temp. Without atomic replace the old file is renamed aside and restored on failure. Directories are merged, never replaced (N-P0-7), and get their real mode/mtime post-order (N-P1-17); symlinks are copied as links, broken ones too (N-P1-8); mode and mtime are preserved (N-P1-9); FIFOs and devices are skipped with a warning. The copy loop goes through a ctx-aware reader with Size() and throttled byte progress. Conflict and error policies are wired in here; their tests follow in 3.3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 lines
344 B
Go
12 lines
344 B
Go
package transfer
|
|
|
|
// Move support lands in task 3.5; until then Execute refuses Op Move.
|
|
|
|
func (e *executor) renameWhole(items []Item) []Item {
|
|
e.rep.Err = ErrUnsupportedMove
|
|
return nil
|
|
}
|
|
|
|
func (e *executor) removeSource(Item) error { return nil }
|
|
func (e *executor) removeSourceDirs() {}
|
|
func (e *executor) addSourceAffected() {}
|