fs

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFSWatcherStartedNotAllowingNewPath = errors.New("watcher already started, cannot add new path")
	ErrFSWatcherHasNoPathsConfigured      = errors.New("watcher has no paths")
)

Functions

This section is empty.

Types

type NotifyWrapper

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

func NewFSWatcher

func NewFSWatcher(opts ...Option) (*NotifyWrapper, error)

func (*NotifyWrapper) AddPath

func (w *NotifyWrapper) AddPath(path string) error

func (*NotifyWrapper) Close

func (w *NotifyWrapper) Close() error

func (*NotifyWrapper) Start

func (w *NotifyWrapper) Start() error

type Option

type Option func(*NotifyWrapper) error

Option is used to configure a NotifyWrapper.

func OnPath

func OnPath(path string) Option

func OnPaths

func OnPaths(paths ...string) Option

func WithErrorChainAsHandler

func WithErrorChainAsHandler(eventsCh chan<- error) Option

func WithErrorEventHandler

func WithErrorEventHandler(handler func(error)) Option

func WithEventChainAsHandler

func WithEventChainAsHandler(eventsCh chan<- fsnotify.Event) Option

func WithEventHandler

func WithEventHandler(handler func(fsnotify.Event)) Option

Jump to

Keyboard shortcuts

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