watcher

package
v0.0.0-...-108d81a Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 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 Watcher

type Watcher struct {
	Paths    []string
	Ignore   []string //patterns to ignore
	OnChange func()   // call back function to be called on file change

	ConfigChange chan struct{}
	// contains filtered or unexported fields
}

func New

func New(paths []string, ignore []string, onChange func()) (*Watcher, error)

new creates a new watcher

func (*Watcher) Close

func (w *Watcher) Close() error

close stops the watcher

func (*Watcher) Start

func (w *Watcher) Start()

starts begins watching file system for changes

Jump to

Keyboard shortcuts

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