Sha256: e50a181724694be9e9827b0ee8b13f8908192cd113045cdbdc4cf1ccf13c5795

Contents?: true

Size: 809 Bytes

Versions: 33

Compression:

Stored size: 809 Bytes

Contents

require 'ffi'

module INotify
  # This module contains the low-level foreign-function interface code
  # for dealing with the inotify C APIs.
  # It's an implementation detail, and not meant for users to deal with.
  #
  # @private
  module Native
    extend FFI::Library
    ffi_lib FFI::Library::LIBC

    # The C struct describing an inotify event.
    #
    # @private
    class Event < FFI::Struct
      layout(
        :wd, :int,
        :mask, :uint32,
        :cookie, :uint32,
        :len, :uint32)
    end

    attach_function :inotify_init, [], :int
    attach_function :inotify_add_watch, [:int, :string, :uint32], :int
    attach_function :inotify_rm_watch, [:int, :uint32], :int

    attach_function :read, [:int, :pointer, :size_t], :ssize_t
    attach_function :close, [:int], :int
  end
end

Version data entries

33 entries across 31 versions & 11 rubygems

Version Path
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb
arcabouco-0.2.13 vendor/bundle/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb
gameboard-3.1.0 vendor/bundle/ruby/2.3.0/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb
gameboard-3.0.0 vendor/bundle/ruby/2.3.0/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb
rb-inotify-0.9.7 lib/rb-inotify/native.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/rb-inotify-0.9.5/lib/rb-inotify/native.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/rb-inotify-0.9.5/lib/rb-inotify/native.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/rb-inotify-0.9.5/lib/rb-inotify/native.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rb-inotify-0.9.5/lib/rb-inotify/native.rb
mastermind_adeybee-0.1.4 vendor/bundle/ruby/2.2.0/gems/rb-inotify-0.9.5/lib/rb-inotify/native.rb
mastermind_adeybee-0.1.3 vendor/bundle/ruby/2.2.0/gems/rb-inotify-0.9.5/lib/rb-inotify/native.rb
mastermind_adeybee-0.1.2 vendor/bundle/ruby/2.2.0/gems/rb-inotify-0.9.5/lib/rb-inotify/native.rb