watcher

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Watch    []string
	Ignore   []string
	Debounce time.Duration
}

Config holds the watcher configuration

type FileEvent

type FileEvent struct {
	Path string
}

FileEvent represents a file change event

type Watcher

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

Watcher monitors filesystem changes

func New

func New(config Config) (*Watcher, error)

New creates a new watcher instance

func (*Watcher) Close

func (w *Watcher) Close() error

Close stops the watcher

func (*Watcher) Events

func (w *Watcher) Events() <-chan FileEvent

Events returns the channel of file events

func (*Watcher) Start

func (w *Watcher) Start()

Start begins watching for file changes (no debouncing - handled in main loop)

Jump to

Keyboard shortcuts

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