watch

package
v0.0.0-...-f1f97c7 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ScanTime = time.Millisecond * 500

ScanTime is time duration for scanning files

Functions

func Watch

func Watch(dirs []string, fn EventHandler)

Watch watch dirs to compare and emmit events

Types

type Event

type Event struct {
	File string `json:"file"`
	Op   string `json:"op"`
}

Event is event of file changes

type EventHandler

type EventHandler func([]*Event)

EventHandler is handler to resolve events

Jump to

Keyboard shortcuts

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