watchers

package
v0.0.0-...-0798a42 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWatcherFactory

func RegisterWatcherFactory(fn WatcherFactoryFunc)

Types

type FSEvent

type FSEvent struct {
	Operation FSOperation
	Path      string
}

type FSOperation

type FSOperation int
const (
	FSCreate FSOperation = iota
	FSRemove
	FSRename
)

type FSWatcher

type FSWatcher interface {
	Configure(string) error
	Events() chan *FSEvent
	// Adds a directory or file to the watcher
	Add(string) error
	// Removes a directory or file from the watcher
	Remove(string) error
}

FSWatcher is a file system watcher

func NewWatcher

func NewWatcher() (FSWatcher, error)

type WatcherFactoryFunc

type WatcherFactoryFunc func() (FSWatcher, error)

Jump to

Keyboard shortcuts

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