lib/sinotify/event.rb
def etypes
      # The etype/mask functions delegated to prim_event, EXCEPT: when :delete_self is in 
      # the list, and path is a directory, change it to 'delete'. If you want
      # the etypes in the original prim_event, ask for event.prim_event.etypes
      if @etypes.nil?
        @etypes = self.prim_event.etypes

        # change :delete_self into :delete 
        if self.directory? and @etypes.include?(:delete_self)
          @etypes.delete(:delete_self)
          @etypes << :delete
        end

        # add :close if :close_write or :close_nowrite are there, but :close is not
        if @etypes.include?(:close_write) || @etypes.include?(:close_nowrite)
          (@etypes << :close) unless @etypes.include?(:close)
        end

      end
      @etypes
    end
# The etypes associated with this event (eg. :create, :modify, :delete, etc)
The etypes associated with this event
The etypes associated with this event
def etypes
      if @etypes.nil?
        @etypes = self.prim_event.etypes
        if self.directory? and @etypes.include?(:delete_self)
          @etypes.delete(:delete_self)
          @etypes << :delete
        end
        if @etypes.include?(:close_write) || @etypes.include?(:close_nowrite)
          (@etypes << :close) unless @etypes.include?(:close)
        end
      end
      @etypes
    end
def etypes if @etypes . nil? @etypes = self . prim_event . etypes if self . directory? and @etypes . include? ( :delete_self ) @etypes . delete ( :delete_self ) @etypes << :delete end if @etypes . include? ( :close_write ) || @etypes . include? ( :close_nowrite ) ( @etypes << :close ) unless @etypes . include? ( :close ) end end @etypes end
The etypes associated with this event (eg.
The etypes associated with this event ( eg .
# The etype/mask functions delegated to prim_event, EXCEPT: when :delete_self is in  # the list, and path is a directory, change it to 'delete'. If you want # the etypes in the original prim_event, ask for event.prim_event.etypes # change :delete_self into :delete  # add :close if :close_write or :close_nowrite are there, but :close is not