class FileWatch::Stat::PathStatClass

Attributes

inode[R]
inode_struct[R]
modified_at[R]
size[R]

Public Class Methods

new(source) click to toggle source
# File lib/filewatch/stat/generic.rb, line 8
def initialize(source)
  @source = source # Pathname
  restat
end

Public Instance Methods

inspect() click to toggle source
# File lib/filewatch/stat/generic.rb, line 25
def inspect
  "<#{self.class.name} size=#{@size}, modified_at=#{@modified_at}, inode='#{@inode}', inode_struct=#{@inode_struct}>"
end
restat() click to toggle source
# File lib/filewatch/stat/generic.rb, line 13
def restat
  stat = @source.stat
  @inode = stat.ino.to_s
  @modified_at = stat.mtime.to_f
  @size = stat.size
  @inode_struct = InodeStruct.new(@inode, stat.dev_major, stat.dev_minor)
end
windows?() click to toggle source
# File lib/filewatch/stat/generic.rb, line 21
def windows?
  false
end