fsnotify

package
v0.0.0-...-3c1f4a5 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: Apache-2.0 Imports: 10 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 {
	// contains filtered or unexported fields
}

Watcher is a recursive fsnotify implementation.

func NewWatcher

func NewWatcher(root string, onNotifyCallback func()) (*Watcher, error)

NewWatcher creates a new recursive fsnotify watch on all directories. If something is added or renamed, that watch tree is re-created. The given callback is not called for each change, but aggregated within a time window of second. It gets only called, as soon as all changes within a second have been applied, so an ever-changing directory will cause the callback to be never called.

func (*Watcher) Close

func (w *Watcher) Close() error

Close removes all watchers.

Jump to

Keyboard shortcuts

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