Versions in this module Expand all Collapse all v0 v0.1.1 Sep 17, 2026 v0.1.0 Sep 17, 2026 Changes in this version + var ErrMaxDepthExceeded = errors.New("maximum directory depth exceeded") + var ErrNotDirectory = errors.New("not a directory") + var ErrSymlinkEscape = errors.New("symlink target escapes the sync root") + type Action string + const ActionDir + const ActionFile + const ActionSkip + const ActionSymlink + type Direction string + const DirectionDownload + const DirectionUpload + type Entry struct + Action Action + Mode os.FileMode + Path string + Reason string + Size int64 + Target string + type Option func(*config) + func WithDirMode(mode os.FileMode) Option + func WithDryRun(dry bool) Option + func WithFileMode(mode os.FileMode) Option + func WithMaxDepth(depth int) Option + func WithPreserveModTime(preserve bool) Option + func WithPreserveMode(preserve bool) Option + func WithSymlinkPolicy(p SymlinkPolicy) Option + type PathError struct + Err error + Op string + Path string + Side Side + func (e *PathError) Error() string + func (e *PathError) Unwrap() error + type Result struct + Bytes int64 + Destination string + Direction Direction + Dirs int + DryRun bool + Duration time.Duration + Entries []Entry + Files int + Skipped int + Source string + Symlinks int + func Download(ctx context.Context, sc *sftp.Client, remoteDir, localDir string, ...) (*Result, error) + func DownloadOverSSH(ctx context.Context, c *ssh.Client, remoteDir, localDir string, opts ...Option) (*Result, error) + func Upload(ctx context.Context, sc *sftp.Client, localDir, remoteDir string, ...) (*Result, error) + func UploadOverSSH(ctx context.Context, c *ssh.Client, localDir, remoteDir string, opts ...Option) (*Result, error) + func (r *Result) String() string + type Side string + const Local + const Remote + type SymlinkPolicy int + const SymlinkDereferenceIncludingOutsideRoot + const SymlinkReplicate + const SymlinkSkip + func (p SymlinkPolicy) String() string