func setFlagsWatchMode(watcher *inotify.Watcher, path string, flags string, nonroot, nodivert bool) error { watcher.RemoveWatch(path) err := setFlags(path, flags, nonroot, nodivert) if err != nil { return err } addWatchToClosestPath(watcher, path) return nil }
func setFlagsWatchMode(watcher *inotify.Watcher, path string, flags string, nonroot bool) (err error) { watcher.RemoveWatch(path) setFlags(path, flags, nonroot) if err != nil { return (err) } addWatchToClosestPath(watcher, path) return }
func unsetWatch(watch *inotify.Watcher, path string) { watch.RemoveWatch(path) }