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","."]
docstr: Parses an event buffer of ``inotify_event`` structs returned by
  inotify::
  
      struct inotify_event {
          __s32 wd;            /* watch descriptor */
          __u32 mask;          /* watch mask */
          __u32 cookie;        /* cookie to synchronize two events */
          __u32 len;           /* length (including nulls) of name */
          char  name[0];       /* stub for possible name */
      };
  
  The ``cookie`` member of this struct is used to pair two related
  events, for example, it pairs an IN_MOVED_FROM event with an
  IN_MOVED_TO event.
code: def _parse_event_buffer(event_buffer):
      """
      Parses an event buffer of ``inotify_event`` structs returned by
      inotify::
  
          struct inotify_event {
              __s32 wd;            /* watch descriptor */
              __u32 mask;          /* watch mask */
              __u32 cookie;        /* cookie to synchronize two events */
              __u32 len;           /* length (including nulls) of name */
              char  name[0];       /* stub for possible name */
          };
  
      The ``cookie`` member of this struct is used to pair two related
      events, for example, it pairs an IN_MOVED_FROM event with an
      IN_MOVED_TO event.
      """
      i = 0
      while i + 16 <= len(event_buffer):
          wd, mask, cookie, length = struct.unpack_from(
              "iIII", event_buffer, i
          )
          name = event_buffer[i + 16 : i + 16 + length].rstrip(b"\0")
          i += 16 + length
          yield wd, mask, cookie, name
  
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 16 for calling the Inotify obj's underlying member method code with example usage: obj._parse_event_buffer(event_buffer) without return types