watcher

package
v0.0.0-...-558b373 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	FSWatcher *fsnotify.Watcher
	Paths     []string
}

Task stores a pointer to FSWatcher from fsnotify and the paths we will be watching

func Create

func Create(p []string) (Task, error)

Create builds our Task struct and creates our NewWatcher from fsNotify

func (*Task) Run

func (t *Task) Run() error

Run watches the directories insides the Path value of the passed in Task, it will block until it detects changes. An error will be returned if invalid paths are set

Jump to

Keyboard shortcuts

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