FAN_ACCESS | Create an event when a file or directory (but see BUGS) is accessed (read).
|
FAN_ACCESS_PERM | Create an event when a permission to read a file or directoryis requested.
An fanotify file descriptor created with FAN_CLASS_PRE_CONTENT or FAN_CLASS_CONTENT is required.
|
FAN_CLOSE | A file is closed (FAN_CLOSE_WRITE|FAN_CLOSE_NOWRITE).
|
FAN_CLOSE_NOWRITE | Create an event when a read-only file or directory is closed.
|
FAN_CLOSE_WRITE | Create an event when a writable file is closed.
|
FAN_EVENT_ON_CHILD | Events for the immediate children of marked directories shall be created.
The flag has no effect when marking mounts and filesystems.
Note that events are not generated for children of the subdirectories of marked directories.
More specifically, the directory entry modification events FAN_CREATE, FAN_DELETE, FAN_MOVED_FROM, and FAN_MOVED_TO arenot generated for any entry modifications performed inside subdirectories of marked directories.
Note that the events FAN_DELETE_SELF and FAN_MOVE_SELF are not generated for children of marked directories.
To monitor complete directory trees it is necessary to mark the relevant mount or filesystem.
|
FAN_MARK_ADD | The events in mask will be added to the mark mask (or to the ignore mask). mask must be nonempty or the error EINVAL will occur.
|
FAN_MARK_DONT_FOLLOW | Remove either all marks for filesystems, all marks for mounts,or all marks for directories and files from the fanotify group.
If flags contains FAN_MARK_MOUNT, all marks for mounts are removed from the group.
If flags contains FAN_MARK_FILESYSTEM, all marks for filesystems are removed from the group.
Otherwise, all marks for directories and files are removed.
No flag other than and at most one of the flags FAN_MARK_MOUNT or FAN_MARK_FILESYSTEM can be used in conjunction with FAN_MARK_FLUSH. mask is ignored.
|
FAN_MARK_FILESYSTEM | Mark the filesystem specified by pathname.
The filesystem containing pathname will be marked.
All the contained files and directories of the filesystem from any mount point will be monitored.
|
FAN_MARK_FLUSH | If pathname is a symbolic link, mark the link itself, rather than the file to which it refers.
(By default,fanotify_mark() dereferences pathname if it is a symbolic link.)
|
FAN_MARK_IGNORED_MASK | The events in mask shall be added to or removed from the ignore mask.
|
FAN_MARK_IGNORED_SURV_MODIFY | The ignore mask shall survive modify events.
If this flag is not set, the ignore mask is cleared when a modify event occurs for the ignored file or directory.
|
FAN_MARK_INODE | Mark the inode specified by pathname.
It is default way to mark.
|
FAN_MARK_MOUNT | Mark the mount point specified by pathname. If pathname is not itself a mount point, the mount point containing pathname will be marked.
All directories, subdirectories, and the contained files of the mount point will be monitored.
The events which require the fanotify_fd file descriptor to have been initialized with the flag FAN_REPORT_FID, such as FAN_CREATE, FAN_ATTRIB, FAN_MOVE, and FAN_DELETE_SELF, cannot be provided as a mask when flags contains FAN_MARK_MOUNT.
Attempting to do so will result in the error EINVAL being returned.
|
FAN_MARK_ONLYDIR | If the filesystem object to be marked is not a directory, the error ENOTDIR shall be raised.
|
FAN_MARK_REMOVE | The events in argument mask will be removed from the mark mask (or from the ignore mask). mask must be nonempty or the error EINVAL will occur.
|
FAN_MODIFY | Create an event when a file is modified (write).
|
FAN_ONDIR | Create events for directories—for example, when opendir(3),readdir(3) (but see BUGS), and closedir(3) are called.
Without this flag, events are created only for files.
In the context of directory entry events, such as FAN_CREATE,FAN_DELETE, FAN_MOVED_FROM, and FAN_MOVED_TO, specifying the flag FAN_ONDIR is required in order to create events when subdirectory entries are modified (i.e., mkdir(2)/ rmdir(2)).
|
FAN_OPEN | Create an event when a file or directory is opened.
|
FAN_OPEN_PERM | Create an event when a permission to open a file or directory is requested.
An fanotify file descriptor created with FAN_CLASS_PRE_CONTENT or FAN_CLASS_CONTENT is required.
|