filewatcher

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MPL-2.0 Imports: 7 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWatcher

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

func NewWatcher

func NewWatcher(opts *WatcherOptions) (*FileWatcher, error)

func (*FileWatcher) Close

func (w *FileWatcher) Close()

func (*FileWatcher) Start

func (w *FileWatcher) Start()

type WatcherOptions

type WatcherOptions struct {
	Directories []string
	Include     []string
	Exclude     []string
	OnChange    func([]fsnotify.Event)
	OnError     func(error)
	ListFlag    files.ListFlag
	// a bit mask of the events that you are interested in
	// e.g: fsnotify.CREATE | fsnotify.REMOVE
	// if no mask is set, all events are published
	EventMask fsnotify.Op
}

Jump to

Keyboard shortcuts

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