Sha256: a7f5c009099f94b4ac04244b2034b5b1d2bd38fc79dde2b8bdee59056003b465

Contents?: true

Size: 777 Bytes

Versions: 15

Compression:

Stored size: 777 Bytes

Contents

# encoding: utf-8

module FileWatch module Stat
  class WindowsPath

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

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

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

    def windows?
      true
    end

    def inspect
      "<WindowsPath 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/windows_path.rb
logstash-input-file-4.1.17 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.16 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.15 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.14 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.13 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.12 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.11 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.10 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.9 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.8 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.7 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.6 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.5 lib/filewatch/stat/windows_path.rb
logstash-input-file-4.1.4 lib/filewatch/stat/windows_path.rb