vcom/internal/transfer/errors.go
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

13 lines
487 B
Go

package transfer
import "errors"
// Prepare refuses a request with one of these (wrapped with the path).
var (
ErrSameFile = errors.New("source and target are the same file")
ErrIntoItself = errors.New("cannot copy a directory into itself")
ErrTargetNotDir = errors.New("target is not a directory")
ErrDuplicateName = errors.New("two sources have the same name")
ErrReadOnly = errors.New("read-only file system")
ErrAborted = errors.New("transfer aborted")
)