dirsync

package module
v0.0.0-...-d96217f Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: MIT Imports: 7 Imported by: 0

README

dirs7nc

Synchronize directories, quickly and efficiently!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Progress

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

func NewProgress

func NewProgress(total int64) *Progress

NewProgress creates a new initialized progress

func Sync

func Sync(srcdir string, dstdir string, limit int) (*Progress, chan error)

Sync syncs two directories, and returns a progress indicator

func (*Progress) Add

func (p *Progress) Add(num int64)

Add increases the progress by a number

func (*Progress) AddTotal

func (p *Progress) AddTotal(num int64)

AddTotal adds to the progress total

func (*Progress) Finished

func (p *Progress) Finished() int64

Finished gets the number of finished items in the progress

func (*Progress) Percent

func (p *Progress) Percent() float64

Percent gets a percent from 0-100 of the progress completed

func (*Progress) SetTotal

func (p *Progress) SetTotal(num int64)

SetTotal sets the progress total

func (*Progress) Subscribe

func (p *Progress) Subscribe(sub func(*Progress))

Subscribe subscribes a function to the progress

func (*Progress) Total

func (p *Progress) Total() int64

Total gets the total items in the progress

Directories

Path Synopsis
cmd
sync command

Jump to

Keyboard shortcuts

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