filenotify

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package filenotify is adapted from https://github.com/gohugoio/hugo/blob/master/watcher/filenotify, Apache-2.0 License.

Package filenotify is adapted from github.com/gohugoio/hugo/blob/master/watcher/filenotify, Apache-2.0 License.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWatchExists = errors.New("watch exists")
)

Functions

This section is empty.

Types

type FileWatcher

type FileWatcher interface {
	Events() <-chan fsnotify.Event
	Errors() <-chan error
	Add(name string) error
	Remove(name string) error
	Close() error
}

FileWatcher is an interface for implementing file notification watchers

func NewEventWatcher

func NewEventWatcher() (FileWatcher, error)

NewEventWatcher returns an fs-event based file watcher

func NewPollingWatcher

func NewPollingWatcher(interval time.Duration) FileWatcher

NewPollingWatcher returns a poll-based file watcher

Jump to

Keyboard shortcuts

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