watcher

package
v0.0.0-...-9082c2d Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ignorer

type Ignorer interface {
	Ignored(string) bool
}

func NewRegexpIgnorer

func NewRegexpIgnorer(r *regexp.Regexp) Ignorer

func NewStringIgnorer

func NewStringIgnorer(ignore string) Ignorer

type IgnorerFunc

type IgnorerFunc func(string) bool

func (IgnorerFunc) Ignored

func (f IgnorerFunc) Ignored(s string) bool

type Watcher

type Watcher struct {
	Ignores []Ignorer
	Logger  *log.Log

	Action func(string)
	Error  func(error)
	// contains filtered or unexported fields
}

Watcher is a server that recursively watches a directory for changes.

It has a set of ignore patterns to ignore certain files / directories.

func NewWatcher

func NewWatcher() *Watcher

func (*Watcher) Close

func (w *Watcher) Close() error

func (*Watcher) Watch

func (w *Watcher) Watch(dir string) error

Jump to

Keyboard shortcuts

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