module documentation

Very low-level ctypes-based interface to Linux inotify(7).

ctypes and a version of libc which supports inotify system calls are required.

Exception INotifyError Unify all the possible exceptions that can be raised by the INotify API.
Function add Add a watch for the given path to the inotify file descriptor, and return the watch descriptor.
Function init Create an inotify instance and return the associated file descriptor.
Function initializeModule Initialize the module, checking if the expected APIs exist and setting the argtypes and restype for inotify_init, inotify_add_watch, and inotify_rm_watch.
Function remove Remove the given watch descriptor from the inotify file descriptor.
Variable libc Undocumented
Variable name Undocumented
def add(fd: int, path: FilePath[Any], mask: int) -> int: (source)

Add a watch for the given path to the inotify file descriptor, and return the watch descriptor.

Parameters
fd:intThe file descriptor returned by libc.inotify_init.
path:FilePath[Any]The path to watch via inotify.
mask:intBitmask specifying the events that inotify should monitor.
Returns
intUndocumented
def init() -> int: (source)

Create an inotify instance and return the associated file descriptor.

def initializeModule(libc: ctypes.CDLL): (source)

Initialize the module, checking if the expected APIs exist and setting the argtypes and restype for inotify_init, inotify_add_watch, and inotify_rm_watch.

def remove(fd: int, wd: int): (source)

Remove the given watch descriptor from the inotify file descriptor.

Undocumented

Undocumented