sync

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSymlink(targetPath, sourcePath string) error

CreateSymlink creates a symlink from target to source

func MigrateToSource

func MigrateToSource(targetPath, sourcePath string) error

MigrateToSource moves files from target to source, then creates symlink

func SyncTarget

func SyncTarget(name string, target config.TargetConfig, sourcePath string, dryRun bool) error

SyncTarget performs the sync operation for a single target

Types

type TargetStatus

type TargetStatus int

TargetStatus represents the state of a target

const (
	StatusUnknown  TargetStatus = iota
	StatusLinked                // Target is a symlink pointing to source
	StatusNotExist              // Target doesn't exist
	StatusHasFiles              // Target exists with files (needs migration)
	StatusConflict              // Target is a symlink pointing elsewhere
	StatusBroken                // Target is a broken symlink
)

func CheckStatus

func CheckStatus(targetPath, sourcePath string) TargetStatus

CheckStatus checks the status of a target

func (TargetStatus) String

func (s TargetStatus) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL