class FSSM::Tree::Cache

Public Instance Methods

directories() click to toggle source
# File lib/fssm/tree.rb, line 156
def directories
  ftype('directory')
end
files() click to toggle source
# File lib/fssm/tree.rb, line 152
def files
  ftype('file')
end
set(path) click to toggle source
Calls superclass method FSSM::Tree::NodeInsertion#set
# File lib/fssm/tree.rb, line 145
def set(path)
  # all paths set from this level need to be absolute
  # realpath will fail on broken links
  path = FSSM::Pathname.for(path).expand_path
  super(path)
end

Private Instance Methods

ftype(ft) click to toggle source
# File lib/fssm/tree.rb, line 168
def ftype(ft)
  inject({}) do |hash, (path, node)|
    hash["#{path}"] = node.mtime if node.ftype == ft
    hash
  end
end