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

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")
)