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
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,18 @@
1
1
# Fanotify Library
2
2
3
-
Fanotify library for Go provides a simple API to monitor filesystem for specific events. The library attempts to simplify specifying events/actions to the watcher by providing valid flag combinations. The flag features are validated against the user's kernel version.
3
+
Fanotify library provides a simple API to monitor filesystem for events.
4
4
5
-
Many of the useful features provided by [fanotify](https://man7.org/linux/man-pages/man7/fanotify.7.html) are available from Linux kernel 5.1 onwards. Most of the useful features availabe through this library work best on kernels 5.1 or later.
5
+
The listener is initialized with flags automatically based on the kernel version. The mark flag features that specify the
6
+
the events to monitor a file/directory are validated and checked for valid combinations and validated against the kernel
7
+
version.
6
8
7
-
## Example: Listener watching for file/directory accessed events
9
+
fanotify has features spanning different kernel versions -
10
+
11
+
For Linux kernel version 5.0 and earlier no additional information about the underlying filesystem object is available.
12
+
For Linux kernel versions 5.1 - 5.8 additional information about the underlying filesystem object is correlated to an event.
13
+
For Linux kernel version 5.9 or later the modified file name is made available in the event.
0 commit comments