# Changelog
+## v1.0.0 / 2014-08-15
+
+* [API] Remove AddWatch on Windows, use Add.
+
## v0.14.3 / 2014-08-15
* Improve documentation for exported identifiers. [#30](https://github.com/go-fsnotify/fsnotify/issues/30)
## v0.13.0 / 2014-06-21
* Events channel of type Event rather than *Event.
-* [API] Remove AddWatch on Windows, use Add.
* [internal] use syscall constants directly for inotify and kqueue.
* [internal] kqueue: rename events to kevents and fileEvent to event.
return <-ch
}
-// AddWatch adds path to the watched file set.
-func (w *Watcher) AddWatch(name string, flags uint32) error {
+// Add starts watching the named file or directory (non-recursively).
+func (w *Watcher) Add(name string) error {
if w.isClosed {
return errors.New("watcher already closed")
}
in := &input{
op: opAddWatch,
path: filepath.Clean(name),
- flags: flags,
+ flags: sys_FS_ALL_EVENTS,
reply: make(chan error),
}
w.input <- in
return <-in.reply
}
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- return w.AddWatch(name, sys_FS_ALL_EVENTS)
-}
-
// Remove stops watching the the named file or directory (non-recursively).
func (w *Watcher) Remove(name string) error {
in := &input{