filewatcher

package
v0.0.0-...-22e48d9 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWatcher

type FileWatcher struct {
	Handler     WatchHandler
	ExcludeDirs []string
	// contains filtered or unexported fields
}

func New

func New() *FileWatcher

func (*FileWatcher) Watch

func (fw *FileWatcher) Watch() error

Watch will do an initial scan to find sub-directories to watch, and will then start listening for file updates. This is to be started in a Go routine.

type WatchHandler

type WatchHandler interface {
	OnStartWatching()
	OnStopWatching()

	// OnFileModified is called when a file of interest has been modified
	OnFileModified(file string)
}

Jump to

Keyboard shortcuts

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