trio_inotify package¶
Submodules¶
trio_inotify.inotify module¶
Tools to interact with the inotify interface
-
class
trio_inotify.inotify.InotifyEvent(wd: int, mask: trio_inotify.inotify.InotifyMasks, cookie: int, file_name: bytes)[source]¶ Bases:
objectUnpacked inotify event bytes.
-
class
trio_inotify.inotify.InotifyMasks¶ Bases:
enum.FlagAn enumeration.
-
IN_ACCESS= 1¶
-
IN_ALL_EVENTS= 4095¶
-
IN_ATTRIB= 4¶
-
IN_CLOEXEC= 524288¶
-
IN_CLOSE= 24¶
-
IN_CLOSE_NOWRITE= 16¶
-
IN_CLOSE_WRITE= 8¶
-
IN_CREATE= 256¶
-
IN_DELETE= 512¶
-
IN_DELETE_SELF= 1024¶
-
IN_DONT_FOLLOW= 33554432¶
-
IN_EXCL_UNLINK= 67108864¶
-
IN_IGNORED= 32768¶
-
IN_ISDIR= 1073741824¶
-
IN_MASK_ADD= 536870912¶
-
IN_MODIFY= 2¶
-
IN_MOVE= 192¶
-
IN_MOVED_FROM= 64¶
-
IN_MOVED_TO= 128¶
-
IN_MOVE_SELF= 2048¶
-
IN_NONBLOCK= 2048¶
-
IN_ONESHOT= 2147483648¶
-
IN_ONLYDIR= 16777216¶
-
IN_OPEN= 32¶
-
IN_Q_OVERFLOW= 16384¶
-
IN_UNMOUNT= 8192¶
-
-
class
trio_inotify.inotify.WatchManager[source]¶ Bases:
objectAdd, remove and track watches on an inotify interface.
-
add_watch(path: str, event_mask: trio_inotify.inotify.InotifyMasks = None, recursive: bool = False) → None[source]¶ Add new watch to inotify interface and track.
Parameters: - path (str) – File/directory to watch.
- event_mask (InotifyMasks) – inotify events to watch for.
- recursive (bool) – Include subdirectories/newly created directories.
Returns: None
-