Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DebouncedEvent ¶
DebouncedEvent represents a batched file system event.
type Debouncer ¶
type Debouncer struct {
// contains filtered or unexported fields
}
Debouncer collects file system events and emits batched events after a quiet period. Multiple events for the same path within the debounce window are collapsed into one.
func NewDebouncer ¶
NewDebouncer creates a debouncer with the specified quiet interval.
func (*Debouncer) Add ¶
Add adds an event to the debounce window. If an event for the same path already exists, it is replaced with the latest operation.
func (*Debouncer) Output ¶
func (d *Debouncer) Output() <-chan []DebouncedEvent
Output returns the channel that receives batched events.
type IgnoreChecker ¶
type IgnoreChecker interface {
ShouldIgnoreDir(absolutePath string) bool
ShouldIgnore(absolutePath string) bool
}
IgnoreChecker is used by the watcher to check if a path should be ignored.
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher provides recursive file system watching with debouncing.
func NewWatcher ¶
NewWatcher creates a recursive file watcher on the given root directory. It registers all non-ignored subdirectories for watching.
func (*Watcher) Events ¶
func (w *Watcher) Events() <-chan []DebouncedEvent
Events returns the channel that receives debounced file system events.