watcher

package
v0.0.0-...-56cb69b Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IgnoredDirs = []string{
	".git",
}

Functions

This section is empty.

Types

type Event

type Event fsnotify.Event

type FSWatcher

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

FSWatcher implements the Watcher interface using fsnotify.

func New

func New(options Options) (*FSWatcher, error)

func (*FSWatcher) AddRecursive

func (w *FSWatcher) AddRecursive(pathname string) error

func (*FSWatcher) Close

func (w *FSWatcher) Close() error

func (*FSWatcher) Monitor

func (w *FSWatcher) Monitor() (<-chan Event, <-chan error)

func (*FSWatcher) Remove

func (w *FSWatcher) Remove(pathname string) error

func (*FSWatcher) WatchList

func (w *FSWatcher) WatchList() []string

type Options

type Options struct {
	Filter ignore.Filter
}

type Watcher

type Watcher interface {
	AddRecursive(pathname string) error
	Monitor() (<-chan Event, <-chan error)
	WatchList() []string
	Remove(pathname string) error
	Close() error
}

Jump to

Keyboard shortcuts

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