Skip to main content

Module inotify

Module inotify 

Source
Expand description

Raw inotify helpers.

This module provides low-level interaction with the Linux inotify subsystem. It handles the initialization of watches, reading of raw events, and decoding of the packed event stream.

Higher-level modules should use these primitives to monitor configuration files, log directories, or process markers. The API stays close to kernel behavior and does only minimal decoding.

Structs§

InotifyEvent
A decoded inotify event header.

Constants§

DELETE_SELF_MASK
Watched file/directory was deleted.
IGNORED_MASK
Watch was removed (explicitly or because file was deleted).
MODIFY_MASK
File was modified.
MOVE_SELF_MASK
Watched file/directory was moved.
PACKAGE_FILE_MASK
Mask for monitoring package file state changes.
PARENT_WATCH_MASK
Mask for monitoring parent directories that may create, replace, or remove a watched file.
QUEUE_OVERFLOW_MASK
Inotify event queue overflowed.
UNMOUNT_MASK
Filesystem containing watched object was unmounted.

Functions§

add_watch
Add a watch to an existing inotify instance.
decode_events
Decode packed inotify events from a raw byte buffer.
init
Create a non-blocking close-on-exec inotify file descriptor.
read_events
Read all available inotify events from the descriptor.
remove_watch
Remove an existing watch descriptor from an inotify instance.