You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -41,8 +41,8 @@ func main() {
41
41
os.Exit(1)
42
42
}
43
43
fmt.Println("Listening to events for:", listenPath)
44
-
var actions Action
45
-
actions =
44
+
var eventTypes EventType
45
+
eventTypes =
46
46
fanotify.FileAccessed |
47
47
fanotify.FileOrDirectoryAccessed |
48
48
fanotify.FileModified |
@@ -61,7 +61,7 @@ func main() {
61
61
fanotify.FileOrDirectoryMovedTo |
62
62
fanotify.WatchedFileMoved |
63
63
fanotify.WatchedFileOrDirectoryMoved
64
-
listener.AddWatch(listenPath, actions)
64
+
listener.AddWatch(listenPath, eventTypes)
65
65
go listener.Start()
66
66
i := 1
67
67
for event := range listener.Events {
@@ -78,13 +78,13 @@ func main() {
78
78
79
79
## Known Issues
80
80
81
-
Certain flag combinations / actions cause issues with event reporting.
81
+
Certain flag combinations / event types cause issues with event reporting.
82
82
83
83
-`fanotify.FileCreated` (`unix.FAN_CREATE`) cannot be or-ed / combined with `fanotify.FileClosed` (`unix.FAN_CLOSE_WRITE` or `unix.FAN_CLOSE_NOWRITE`). The `fanotify` event notification group does not generate any event for this combination.
84
84
85
-
- Using `fanotify.FileOpened` with any of the actions containing `OrDirectory` (`unix.FAN_ONDIR`) causes an event flood for the directory and then stopping raising any events at all.
85
+
- Using `fanotify.FileOpened` with any of the event types containing `OrDirectory` (`unix.FAN_ONDIR`) causes an event flood for the directory and then stopping raising any events at all.
86
86
87
-
-`fanotifyFileOrDirectoryOpened` with any of the other actions causes an event flood for the directory and then stopping raising any events at all.
87
+
-`fanotifyFileOrDirectoryOpened` with any of the other event types causes an event flood for the directory and then stopping raising any events at all.
// - [FileOpened] with any of the event types containing OrDirectory causes an event flood for the directory and then stopping raising any events at all.
181
+
// - [FileOrDirectoryOpened] with any of the other event types causes an event flood for the directory and then stopping raising any events at all.
0 commit comments