Class: Fluent::Plugin::InStaticFile::FileInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/fluent/plugin/in_static_file/file_tracker.rb

Overview

file information structure

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#inoObject

Returns the value of attribute ino

Returns:

  • (Object)

    the current value of ino



86
87
88
# File 'lib/fluent/plugin/in_static_file/file_tracker.rb', line 86

def ino
  @ino
end

#mtime_nsObject

Returns the value of attribute mtime_ns

Returns:

  • (Object)

    the current value of mtime_ns



86
87
88
# File 'lib/fluent/plugin/in_static_file/file_tracker.rb', line 86

def mtime_ns
  @mtime_ns
end

#mtime_sObject

Returns the value of attribute mtime_s

Returns:

  • (Object)

    the current value of mtime_s



86
87
88
# File 'lib/fluent/plugin/in_static_file/file_tracker.rb', line 86

def mtime_s
  @mtime_s
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



86
87
88
# File 'lib/fluent/plugin/in_static_file/file_tracker.rb', line 86

def path
  @path
end

Instance Method Details

#==(other) ⇒ Object



87
88
89
90
91
# File 'lib/fluent/plugin/in_static_file/file_tracker.rb', line 87

def ==(other)
  return false unless other.is_a?(FileInfo)

  path == other.path && ino == other.ino && mtime_s == other.mtime_s && mtime_ns == other.mtime_ns
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


97
98
99
# File 'lib/fluent/plugin/in_static_file/file_tracker.rb', line 97

def eql?(other)
  self == other
end

#hashObject



93
94
95
# File 'lib/fluent/plugin/in_static_file/file_tracker.rb', line 93

def hash
  path.hash
end

#to_file_tracker_entry_format(format = FileTracker::FILE_TRACKER_ENTRY_FORMAT) ⇒ Object



101
102
103
# File 'lib/fluent/plugin/in_static_file/file_tracker.rb', line 101

def to_file_tracker_entry_format(format = FileTracker::FILE_TRACKER_ENTRY_FORMAT)
  format(format, path, ino, mtime_s, mtime_ns)
end