A module containing all the inotify flags to be passed to {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.
returns the maximum length of a filename in the directory path or fd that the process is allowed to create. The corresponding macro is _POSIX_NAME_MAX.
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 86 def self.from_mask(mask) constants.map {|c| c.to_s}.select do |c| next false unless c =~ /^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 77 def self.to_mask(flags) flags.map {|flag| const_get("IN_#{flag.to_s.upcase}")}. inject(0) {|mask, flag| mask | flag} end