fswatch

package
v2.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package fswatch stays on os.* rather than acfs: it watches arbitrary user-configured paths and deliberately follows symlinks that may resolve outside any confinement root, which acfs cannot do.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watcher

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

func NewWatcher

func NewWatcher(watchPath string, opts WatcherOptions) (*Watcher, error)

func (*Watcher) Start

func (fw *Watcher) Start(ctx context.Context) error

func (*Watcher) Stop

func (fw *Watcher) Stop() error

type WatcherOptions

type WatcherOptions struct {
	Debounce          time.Duration
	OnChange          func(ctx context.Context)
	OnChangePaths     func(ctx context.Context, paths []string)
	MaxDepth          int
	FollowSymlinkDirs bool
}

Jump to

Keyboard shortcuts

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