class FileWatch::Stat::WindowsPath

Attributes

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

Public Class Methods

new(source) click to toggle source
# File lib/filewatch/stat/windows_path.rb, line 8
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

Public Instance Methods

inspect() click to toggle source
# File lib/filewatch/stat/windows_path.rb, line 26
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/windows_path.rb, line 16
def restat
  stat = @source.stat
  @modified_at = stat.mtime.to_f
  @size = stat.size
end
windows?() click to toggle source
# File lib/filewatch/stat/windows_path.rb, line 22
def windows?
  true
end