Example #1
0
func main() {
	w := filemon.NewWatcher(func(ev *filemon.WatchEvent) {
		fmt.Println(ev)
	})
	w.Watch("./")

	w.WaitForKill()
}
Example #2
0
func ExampleWatcher() {

	// create a new watcher
	w := filemon.NewWatcher(func(ev *filemon.WatchEvent) {
		fmt.Println(ev)
	})

	// watch the current path
	w.Watch("./")

	// wait for a ctrl+c
	w.WaitForKill()

}