fsnotify

package
v1.39.14 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Watch = notify.Watch
)

For testing

Functions

This section is empty.

Types

type Trigger

type Trigger struct {
	Interval time.Duration
	// contains filtered or unexported fields
}

Trigger watches for changes with fsnotify

func New

func New(workspaces map[string]struct{}, isActive func() bool, duration int) *Trigger

func (*Trigger) Debounce

func (t *Trigger) Debounce() bool

Debounce tells the watcher to not debounce rapid sequence of changes.

func (*Trigger) Ignore

func (t *Trigger) Ignore(_ notify.EventInfo) bool

Ignore checks if the change detected is to be ignored or not. Currently, returns false i.e Allows all files changed.

func (*Trigger) IsActive

func (t *Trigger) IsActive() func() bool

IsActive returns the function to run if Trigger is active.

func (*Trigger) LogWatchToUser

func (t *Trigger) LogWatchToUser(out io.Writer)

func (*Trigger) Start

func (t *Trigger) Start(ctx context.Context) (<-chan bool, error)

Start listening for file system changes

Jump to

Keyboard shortcuts

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