Listen::Adapter::Linux

Listener implementation for Linux `inotify`.

Constants

EVENTS

Watched inotify events

@see www.tin.org/bin/man.cgi?section=7&topic=inotify @see github.com/nex3/rb-inotify/blob/master/lib/rb-inotify/notifier.rb#L99-L177

INOTIFY_LIMIT_MESSAGE

The message to show when the limit of inotify watchers is not enough

Public Class Methods

new(listener) click to toggle source
# File lib/listen/adapter/linux.rb, line 27
def initialize(listener)
  require 'rb-inotify'
  super
end
usable?() click to toggle source
# File lib/listen/adapter/linux.rb, line 23
def self.usable?
  RbConfig::CONFIG['target_os'] =~ /linux/
end

Public Instance Methods

start() click to toggle source
# File lib/listen/adapter/linux.rb, line 32
def start
  worker = _init_worker
  worker.run
rescue Errno::ENOSPC
  abort(INOTIFY_LIMIT_MESSAGE)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.