class FSSM::Tree::Node
Attributes
ftype[RW]
mtime[RW]
Public Instance Methods
<=>(other)
click to toggle source
# File lib/fssm/tree.rb, line 124 def <=>(other) return unless other.is_a?(::FSSM::Tree::Node) self.mtime <=> other.mtime end
from_path(path)
click to toggle source
# File lib/fssm/tree.rb, line 129 def from_path(path) path = FSSM::Pathname.for(path) @ftype = path.ftype # this handles bad symlinks without failing. why handle bad symlinks at # all? well, we could still be interested in their creation and deletion. @mtime = path.symlink? ? Time.at(0) : path.mtime self end