class_docstr: Linux inotify(7) API wrapper class.
  
  :param path:
      The directory path for which we want an inotify object.
  :type path:
      :class:`bytes`
  :param recursive:
      ``True`` if subdirectories should be monitored; ``False`` otherwise.
class_docstr_tok: ["Linux","inotify","(","7",")","API","wrapper","class",".",":","param","path",":","The","directory","path","for","which","we","want","an","inotify","object",".",":","type","path",":",":","class",":","`","bytes","`",":","param","recursive",":","``","True","``","if","subdirectories","should","be","monitored",";","``","False","``","otherwise","."]
code: def __init__(
      self, path, recursive=False, event_mask=WATCHDOG_ALL_EVENTS
  ):
      # The file descriptor associated with the inotify instance.
      inotify_fd = inotify_init()
      if inotify_fd == -1:
          Inotify._raise_error()
      self._inotify_fd = inotify_fd
      self._lock = threading.Lock()
  
      # Stores the watch descriptor for a given path.
      self._wd_for_path = dict()
      self._path_for_wd = dict()
  
      self._path = path
      self._event_mask = event_mask
      self._is_recursive = recursive
      self._add_dir_watch(path, recursive, event_mask)
      self._moved_from_events = dict()
  
imports: from __future__ import with_statement
  import os
  import errno
  import struct
  import threading
  import ctypes
  import ctypes.util
  from functools import reduce
  from ctypes import c_int, c_char_p, c_uint32
  from wandb_watchdog.utils import has_attribute
  from wandb_watchdog.utils import UnsupportedLibc
label_desc: Use image node_id 1 to create a new Inotify object from inherited base classes: object with example: obj = Inotify(path, recursive, event_mask)