]> go.fuhry.dev Git - fsnotify.git/commitdiff
Remove AddWatch on Windows, use Add.
authorNathan Youngman <git@nathany.com>
Sat, 16 Aug 2014 05:12:21 +0000 (23:12 -0600)
committerNathan Youngman <git@nathany.com>
Sat, 16 Aug 2014 05:12:21 +0000 (23:12 -0600)
I really thought I did this before. :disappointed:

CHANGELOG.md
fsnotify_windows.go

index 3e78e16c52ca84090657eb96c8d1d6f1d0704444..79c78aa0b0fc1da26dbc3c64cd19ace085690f8c 100644 (file)
@@ -1,5 +1,9 @@
 # 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)
@@ -24,7 +28,6 @@
 ## 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.
 
index 31c13ba5225db67e4e01aa7e7f87bf4d860e0d24..520f32ef5ebba05f95cb7a538671e02496d85f5b 100644 (file)
@@ -140,15 +140,15 @@ func (w *Watcher) Close() error {
        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
@@ -158,11 +158,6 @@ func (w *Watcher) AddWatch(name string, flags uint32) error {
        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{