// NewWatcher initialize a new Watcher.
NewWatcher initialize a new Watcher.
// NewWatcher initialize a new Watcher .
func NewWatcher(p string) (*Watcher, error) {
	n, err := fsnotify.NewWatcher()
	if err != nil {
		return nil, err
	}
	w := &Watcher{
		Done:     make(chan bool),
		Path:     p,
		Notifier: n,
	}
	w.AddToWatchList(w.Path)
	return w, nil
}
func NewWatcher ( p string ) ( * Watcher , error ) { n , err := fsnotify . NewWatcher ( ) if err != nil { return nil , err } w := & Watcher { Done : make ( chan bool ) , Path : p , Notifier : n , } w . AddToWatchList ( w . Path ) return w , nil }
NewWatcher initialize a new Watcher.
NewWatcher initialize a new Watcher .