Skip to content

Commit 5d58403

Browse files
committed
[MOD] add event flags
1 parent 63bf283 commit 5d58403

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎backend_kqueue.go‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,14 @@ func (w *Watcher) AddWith(name string, opts ...addOpt) error {
315315
return err
316316
}
317317

318+
func (w *Watcher) AddWithEvents(name string, flags uint32) error {
319+
w.mu.Lock()
320+
w.userWatches[name] = struct{}{}
321+
w.mu.Unlock()
322+
_, err := w.addWatch(name, flags)
323+
return err
324+
}
325+
318326
// Remove stops monitoring the path for changes.
319327
//
320328
// Directories are always removed non-recursively. For example, if you added

0 commit comments

Comments
 (0)