dsync

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir(sfs fs.FS, sdir string, tfs vfs.ReadWritable, tdir string, options ...Option) error

Dir syncs the source directory from the source filesystem to the target directory in the target filesystem

func Rel

func Rel(sdir, tdir string) func(path string) (string, error)

Types

type Op

type Op struct {
	Type OpType
	Path string
	Data []byte
}

func (Op) String

func (o Op) String() string

type OpType

type OpType uint8
const (
	CreateType OpType = iota + 1
	UpdateType
	DeleteType
)

func (OpType) String

func (ot OpType) String() string

type Option

type Option func(o *option)

func WithSkip

func WithSkip(skips ...skipFunc) Option

Provide a skip function

Note: try to skip as high up in the tree as possible. E.g. if the source filesystem doesn't have bud, it will delete bud, even if you're skipping bud/generate.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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