watch

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultIgnore = []string{

	".*", "~*", "*~",

	"*.[ao]", "*.so", "*.obj",

	"*.log",

	"*.test", "*.prof",

	"*.exe", "*.dll",
}

Functions

func Changes

func Changes(interval time.Duration, monitor, ignore, care []string, recurse bool) chan []Change

Types

type Change

type Change struct {
	Kind     string
	Path     string
	Modified time.Time
}

type Globs

type Globs struct {
	NoDefault  bool
	Default    []string
	Additional []string
}

func (*Globs) All

func (globs *Globs) All() []string

func (*Globs) Set

func (globs *Globs) Set(value string) error

func (*Globs) String

func (globs *Globs) String() string

type Watch

type Watch struct {
	Changes chan []Change
	// contains filtered or unexported fields
}

func New

func New(interval time.Duration, monitor, ignore, care []string, recurse bool) *Watch

func (*Watch) Run

func (watch *Watch) Run()

func (*Watch) Start

func (watch *Watch) Start()

func (*Watch) Stop

func (watch *Watch) Stop()

func (*Watch) Wait

func (watch *Watch) Wait() bool

Jump to

Keyboard shortcuts

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