Sha256: a4c6d695b3dea32c4cc8a57d1500813d895f5196fa392fc429b1380280354b83

Contents?: true

Size: 794 Bytes

Versions: 166

Compression:

Stored size: 794 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 "c"

    # 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

166 entries across 74 versions & 6 rubygems

Version Path
classiccms-0.6.9 vendor/bundle/gems/guard-1.0.2/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.8 vendor/bundle/gems/guard-1.0.2/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.8 vendor/bundle/gems/guard-1.0.3/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.8 vendor/bundle/gems/guard-1.0.1/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.7 vendor/bundle/gems/guard-1.0.1/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.7 vendor/bundle/gems/guard-1.0.3/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.7 vendor/bundle/gems/guard-1.0.2/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.6 vendor/bundle/gems/guard-1.0.2/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.6 vendor/bundle/gems/guard-1.0.3/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.6 vendor/bundle/gems/guard-1.0.1/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.5 vendor/bundle/gems/guard-1.0.1/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.5 vendor/bundle/gems/guard-1.0.2/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.5 vendor/bundle/gems/guard-1.0.3/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.4 vendor/bundle/gems/guard-1.0.3/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.4 vendor/bundle/gems/guard-1.0.1/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.4 vendor/bundle/gems/guard-1.0.2/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.3 vendor/bundle/gems/guard-1.0.1/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.3 vendor/bundle/gems/guard-1.0.2/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.3 vendor/bundle/gems/guard-1.0.3/lib/vendor/linux/lib/rb-inotify/native.rb
classiccms-0.6.2 vendor/bundle/gems/guard-1.0.3/lib/vendor/linux/lib/rb-inotify/native.rb