filesums

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Directory

type Directory struct {
	Created int64             `json:"created"`
	Updated int64             `json:"updated"`
	Files   map[string]string `json:"files"`
	// contains filtered or unexported fields
}

func NewDirectory

func NewDirectory(path string, report bool) *Directory

func (*Directory) Update

func (self *Directory) Update(stats *Stats) error

func (*Directory) Verify

func (self *Directory) Verify(failed chan string, stats *Stats) bool

type FileSums

type FileSums struct {
	Directories map[string]*Directory
	Root        string
	Workers     int
	Quiet       bool
	Progress    bool
	Stats       *Stats
}

func NewFileSums

func NewFileSums(root string, workers int, quiet bool, progress bool) (*FileSums, error)

func (*FileSums) Update

func (self *FileSums) Update() (err error)

Update searches for new files or files with wrong checksums and store them

func (*FileSums) Verify

func (self *FileSums) Verify() (err error)

Verify searches for previously seen files that do not match and report them

type Stats

type Stats struct {
	StartTime time.Time
	// contains filtered or unexported fields
}

func NewStats

func NewStats() *Stats

func (*Stats) DirCount

func (self *Stats) DirCount() int

func (*Stats) Directories

func (self *Stats) Directories() int

func (*Stats) Failed

func (self *Stats) Failed() int

func (*Stats) FailedFiles

func (self *Stats) FailedFiles() []*string

func (*Stats) IncrDirectories

func (self *Stats) IncrDirectories()

func (*Stats) IncrFailed

func (self *Stats) IncrFailed(f *string)

func (*Stats) IncrNew

func (self *Stats) IncrNew(f *string)

func (*Stats) IncrUpdated

func (self *Stats) IncrUpdated(f *string)

func (*Stats) IncrVerified

func (self *Stats) IncrVerified()

func (*Stats) IsCompleted

func (self *Stats) IsCompleted() bool

func (*Stats) New

func (self *Stats) New() int

func (*Stats) NewFiles

func (self *Stats) NewFiles() []*string

func (*Stats) SetDirCount

func (self *Stats) SetDirCount(c int)

func (*Stats) ShowProgress

func (self *Stats) ShowProgress()

func (*Stats) StopProgress

func (self *Stats) StopProgress()

func (*Stats) Updated

func (self *Stats) Updated() int

func (*Stats) UpdatedFiles

func (self *Stats) UpdatedFiles() []*string

func (*Stats) Verified

func (self *Stats) Verified() int

Jump to

Keyboard shortcuts

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