notifywatch

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: EUPL-1.2 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotifyHandlerFun

type NotifyHandlerFun func(*notify.EventInfo) error

type NotifyWatcher

type NotifyWatcher struct {
	// contains filtered or unexported fields
}

func NewNotifyWatcher

func NewNotifyWatcher(dir string, recursive bool, handler NotifyHandlerFun, events ...notify.Event) *NotifyWatcher

NewNotifyWatcher watches the given dir and calls handler on inotify events a dir ending in "/*" will result in a recursive watch

func (*NotifyWatcher) IsWatching

func (nw *NotifyWatcher) IsWatching() bool

func (*NotifyWatcher) Stop

func (nw *NotifyWatcher) Stop() error

func (*NotifyWatcher) Watch

func (nw *NotifyWatcher) Watch() error

Watch starts an initialised notify watcher (blockings)

Jump to

Keyboard shortcuts

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