A module containing all the inotify flags to be passed to {INotify::Notifier#watch}.
@private
File was accessed.
All events which a program can wait on.
Metadata changed.
Close.
Unwrittable file closed.
Writtable file was closed.
Subfile was created.
Subfile was deleted.
Self was deleted.
Do not follow a sym link.
File was ignored.
Event occurred against dir.
Add to the mask of an already existing watch.
File was modified.
Moves.
File was moved from X.
File was moved to Y.
Self was moved.
Only send event once.
Only watch the path if it is a directory.
File was opened.
Event queued overflowed.
Backing fs was unmounted.
Converts a bitmask from the C API into a list of flags.
@param mask [Fixnum] @return [Array<Symbol>]
# File lib/rb-inotify/native/flags.rb, line 81 def self.from_mask(mask) constants.map {|c| c.to_s}.select do |c| next false unless c =~ %r^IN_/ const_get(c) & mask != 0 end.map {|c| c.sub("IN_", "").downcase.to_sym} - [:all_events] end
Converts a list of flags to the bitmask that the C API expects.
@param flags [Array<Symbol>] @return [Fixnum]
# File lib/rb-inotify/native/flags.rb, line 72 def self.to_mask(flags) flags.map {|flag| const_get("IN_#{flag.to_s.upcase}")}. inject(0) {|mask, flag| mask | flag} end