rsync

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultFlags

func DefaultFlags() []string

func OverlayTreeSyncFlags

func OverlayTreeSyncFlags() []string

OverlayTreeSyncFlags provides the rsync flags that are used to sync directories or raw images during the overlay tree extraction. It does not keep permissions on pre-existing files or directories and it does not keep ownership of files and directories.

Types

type Opts

type Opts func(r *Rsync)

func WithContext

func WithContext(ctx context.Context) Opts

func WithFlags

func WithFlags(flags ...string) Opts

type Rsync

type Rsync struct {
	// contains filtered or unexported fields
}

func NewRsync

func NewRsync(s *sys.System, opts ...Opts) *Rsync

func (Rsync) MirrorData

func (r Rsync) MirrorData(source string, target string, excludes []string, deleteExcludes []string) error

MirrorData rsync's source folder contents to a target folder content, in contrast, to SyncData this method adds the --delete flag which forces the deletion of files in target that are missing in source.

func (Rsync) SyncData

func (r Rsync) SyncData(source string, target string, excludes ...string) error

SyncData rsync's source folder contents to a target folder content, both are expected to exist before hand.

Jump to

Keyboard shortcuts

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