Commit graph

3 commits

Author SHA1 Message Date
vrubelroman
b3f9452a1d feat(transfer): move by rename or copy+delete per item (3.5)
With SameConn a top-level item without a target is renamed whole
(NoReplace), and files merged into an existing directory are renamed one by
one; EXDEV or any rename failure falls back to copy. Otherwise each file or
link is copied, its size checked and only then removed from the source
(Remove never follows links: N-P0-3); source directories are removed
bottom-up only when empty, so skipped and failed items stay in place.
Links are always moved as links (FollowLinks is ignored for a move: N-P1-8).
Affected includes the source directories.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 04:04:31 +03:00
vrubelroman
86c110f0b1 feat(transfer): WriteAtomic and Execute for files, dirs and links (3.2)
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>
2026-11-01 04:00:31 +03:00
vrubelroman
76ae6c3a87 feat(transfer): request/plan types, FSSource and Prepare (3.1)
Prepare refuses a read-only or non-directory target, a root that is the
same file as its target (also through a symlinked directory: N-P0-6) and a
directory copied into itself; walks the source once (links as links, or
followed with loop detection); lists each existing target directory once
instead of a stat per file (N-P2-4/5); fills Existing and the per-file
Conflicts and computes exact TotalFiles/TotalBytes (N-P1-13).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 03:56:21 +03:00