Class: Libuv::FSEvent

Inherits:
Handle show all
Defined in:
lib/libuv/fs_event.rb

Constant Summary collapse

EVENTS =
{1 => :rename, 2 => :change}.freeze

Constants included from Assertions

Assertions::MSG_NO_PROC

Constants inherited from Q::Promise

Q::Promise::MAKE_PROMISE

Instance Attribute Summary

Attributes inherited from Handle

#closed, #loop, #storage

Instance Method Summary collapse

Methods inherited from Handle

#active?, #close, #closing?, #ref, #unref

Methods included from Assertions

#assert_block, #assert_boolean, #assert_type

Methods included from Resource

#check_result, #check_result!, #resolve, #to_ptr

Methods inherited from Q::DeferredPromise

#resolved?, #then

Methods inherited from Q::Promise

#catch, #finally, #progress

Constructor Details

#initialize(loop, path) ⇒ FSEvent

Returns a new instance of FSEvent.



8
9
10
11
12
13
14
15
# File 'lib/libuv/fs_event.rb', line 8

def initialize(loop, path)
    @loop = loop

    fs_event_ptr = ::Libuv::Ext.create_handle(:uv_fs_event)
    error = check_result ::Libuv::Ext.fs_event_init(loop.handle, fs_event_ptr, path, callback(:on_fs_event), 0)

    super(fs_event_ptr, error)
end