class INotify::Event

def initialize(data, notifier)

Parameters:
  • notifier (Notifier) -- The {Notifier} that fired the event
  • data (String) -- The data string

Other tags:
    Private: -
def initialize(data, notifier)
  ptr = FFI::MemoryPointer.from_string(data)
  @native = Native::Event.new(ptr)
  @related = []
  @cookie = @native[:cookie]
  @name = fix_encoding(data[@native.size, @native[:len]].gsub(/\0+$/, ''))
  @notifier = notifier
  @watcher_id = @native[:wd]
  raise QueueOverflowError.new("inotify event queue has overflowed.") if @native[:mask] & Native::Flags::IN_Q_OVERFLOW != 0
end