Versions in this module Expand all Collapse all v0 v0.4.0 May 4, 2026 v0.3.0 Apr 25, 2026 Changes in this version + func CopyBetweenPaths(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string) error + func CopyFile(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string) error + func CopyFromPath(ctx context.Context, src omnistorage.Backend, srcPath string, writer io.Writer) (int64, error) + func CopyToPath(ctx context.Context, dst omnistorage.Backend, reader io.Reader, dstPath string, ...) error + func IsRetryError(err error) bool + func IsTemporaryError(err error) bool + func MoveFile(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string) error + func NeedsUpdate(src, dst FileInfo, opts Options) bool + func QuickVerify(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string) (bool, error) + func Verify(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string, ...) (bool, error) + func VerifyAllIntegrity(ctx context.Context, backend omnistorage.Backend, basePath string) ([]string, error) + func VerifyAndReport(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string, ...) (string, error) + func VerifyChecksum(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string) (bool, error) + func VerifyFile(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string) (bool, error) + func VerifyIntegrity(ctx context.Context, backend omnistorage.Backend, filePath string) error + type BisyncOptions struct + BandwidthLimit int64 + Checksum bool + Concurrency int + ConflictStrategy ConflictStrategy + ConflictSuffix string + DeleteMissing bool + DryRun bool + Filter *filter.Filter + Logger *slog.Logger + MaxErrors int + PreserveMetadata *MetadataOptions + Progress func(Progress) + Retry *RetryConfig + func DefaultBisyncOptions() BisyncOptions + type BisyncResult struct + BytesTransferred int64 + Conflicts []Conflict + CopiedToPath1 int + CopiedToPath2 int + DeletedFromPath1 int + DeletedFromPath2 int + DryRun bool + Duration time.Duration + Errors []FileError + Skipped int + UpdatedInPath1 int + UpdatedInPath2 int + func Bisync(ctx context.Context, backend1, backend2 omnistorage.Backend, ...) (*BisyncResult, error) + func (r *BisyncResult) Success() bool + func (r *BisyncResult) TotalCopied() int + func (r *BisyncResult) TotalDeleted() int + func (r *BisyncResult) TotalUpdated() int + type CheckResult struct + Differ []string + DstOnly []string + Errors []FileError + Match []string + SrcOnly []string + func Check(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string, ...) (*CheckResult, error) + func (r *CheckResult) InSync() bool + type Conflict struct + Error error + Path string + Path1Info FileInfo + Path2Info FileInfo + Resolution string + type ConflictStrategy int + const ConflictDestWins + const ConflictError + const ConflictKeepBoth + const ConflictLargerWins + const ConflictNewerWins + const ConflictSkip + const ConflictSourceWins + type DiffEntry struct + Path string + Status DiffStatus + func Diff(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string, ...) ([]DiffEntry, error) + type DiffStatus string + const DiffStatusDeleted + const DiffStatusModified + const DiffStatusNew + type FileError struct + Err error + Op string + Path string + func (e FileError) Error() string + type FileInfo struct + Hash string + IsDir bool + ModTime time.Time + Path string + Size int64 + type MetadataOptions struct + ContentType bool + CustomMetadata bool + ModTime bool + func DefaultMetadataOptions() *MetadataOptions + type Options struct + BandwidthLimit int64 + Checksum bool + Concurrency int + DeleteExcluded bool + DeleteExtra bool + DryRun bool + Filter *filter.Filter + IgnoreExisting bool + IgnoreSize bool + IgnoreTime bool + Logger *slog.Logger + MaxErrors int + PreserveMetadata *MetadataOptions + Progress func(Progress) + Retry *RetryConfig + SizeOnly bool + func DefaultOptions() Options + type Phase string + const PhaseComparing + const PhaseComplete + const PhaseDeleting + const PhaseScanning + const PhaseTransferring + type Progress struct + BytesTransferred int64 + CurrentFile string + Errors int + FilesDeleted int + FilesTransferred int + Phase Phase + TotalBytes int64 + TotalFiles int + type Result struct + BytesTransferred int64 + Copied int + Deleted int + DryRun bool + Duration time.Duration + Errors []FileError + Skipped int + Updated int + func Copy(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string, ...) (*Result, error) + func CopyDir(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string) (*Result, error) + func CopyWithProgress(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string, ...) (*Result, error) + func Move(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string, ...) (*Result, error) + func MustCopy(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string) *Result + func Sync(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string, ...) (*Result, error) + func TreeCopy(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string, ...) (*Result, error) + func (r *Result) Success() bool + type RetryConfig struct + InitialDelay time.Duration + Jitter float64 + MaxDelay time.Duration + MaxRetries int + Multiplier float64 + RetryableErrors func(error) bool + func DefaultRetryConfig() RetryConfig + type RetryError struct + Attempts int + LastErr error + func (e *RetryError) Error() string + func (e *RetryError) Unwrap() error + type VerifyResult struct + Errors []FileError + ExtraInDst []string + MatchingFiles int + MismatchedFiles []string + MissingInDst []string + TotalFiles int + Verified bool + func VerifyWithDetails(ctx context.Context, src, dst omnistorage.Backend, srcPath, dstPath string, ...) (*VerifyResult, error)