class EventMachine::FileWatch
@see EventMachine.watch_file
@note On Mac OS X, file watching only works when kqueue is enabled
* File is moved
* File is deleted
* File is modified
Utility class that is useful for file monitoring. Supported events are
def file_deleted
- Abstract: -
Other tags:
- Note: - On Linux (with {http://en.wikipedia.org/wiki/Inotify inotify}), this method will not be called until *all* open file descriptors to
def file_deleted end
def file_modified
- Abstract: -
def file_modified end
def file_moved
- Abstract: -
def file_moved end
def path
- See: EventMachine.watch_file -
Returns:
-
(String)
-
Other tags:
- Note: - Current implementation does not pick up on the new filename after a rename occurs.
def path @path end
def receive_data(data)
- Private: -
def receive_data(data) case data when Cmodified file_modified when Cdeleted file_deleted when Cmoved file_moved end end
def stop_watching
This involves cleaning up the underlying monitoring details with kqueue/inotify, and in turn firing {EventMachine::Connection#unbind}.
Discontinue monitoring of the file.
def stop_watching EventMachine::unwatch_filename(@signature) end # stop_watching