Sha256: dcaedb2ae836acc02892b1fbd57f4346d006628c27d88da7e5a5c262f5fbfad7

Contents?: true

Size: 793 Bytes

Versions: 15

Compression:

Stored size: 793 Bytes

Contents

# encoding: utf-8

module FileWatch module Stat
  class Generic

    attr_reader :identifier, :inode, :modified_at, :size, :inode_struct

    def initialize(source)
      @source = source
      @identifier = nil
      restat
    end

    def add_identifier(identifier) self; end

    def restat
      @inner_stat = @source.stat
      @inode = @inner_stat.ino.to_s
      @modified_at = @inner_stat.mtime.to_f
      @size = @inner_stat.size
      @dev_major = @inner_stat.dev_major
      @dev_minor = @inner_stat.dev_minor
      @inode_struct = InodeStruct.new(@inode, @dev_major, @dev_minor)
    end

    def windows?
      false
    end

    def inspect
      "<Generic size='#{@size}', modified_at='#{@modified_at}', inode='#{@inode}', inode_struct='#{@inode_struct}'>"
    end
  end
end end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
logstash-input-file-4.1.18 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.17 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.16 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.15 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.14 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.13 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.12 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.11 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.10 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.9 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.8 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.7 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.6 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.5 lib/filewatch/stat/generic.rb
logstash-input-file-4.1.4 lib/filewatch/stat/generic.rb