Sha256: ba33bfb51478223abd93d695a227c4e3ca097de30ca73c7cba2cce16c8f0679a

Contents?: true

Size: 693 Bytes

Versions: 14

Compression:

Stored size: 693 Bytes

Contents

# encoding: utf-8

module FileWatch module Stat
  class WindowsPath

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

    def initialize(source)
      @source = source # Pathname
      @inode = Winhelper.identifier_from_path(@source.to_path)
      # in windows the dev hi and low are in the identifier
      @inode_struct = InodeStruct.new(@inode, 0, 0)
      restat
    end

    def restat
      stat = @source.stat
      @modified_at = stat.mtime.to_f
      @size = stat.size
    end

    def windows?
      true
    end

    def inspect
      "<#{self.class.name} size=#{@size}, modified_at=#{@modified_at}, inode=#{@inode}, inode_struct=#{@inode_struct}>"
    end
  end
end end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
logstash-input-file-4.4.6 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.4.5 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.4.4 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.4.3 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.4.2 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.4.1 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.4.0 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.3.1 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.3.0 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.2.4 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.2.3 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.2.2 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.2.1 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.2.0 lib/filewatch/stat/windows_path.rb