class FSSM::State::Directory

Attributes

path[R]

Public Class Methods

new(path, options={}) click to toggle source
# File lib/fssm/state/directory.rb, line 5
def initialize(path, options={})
  @path    = path
  @options = options
  @cache   = FSSM::Tree::Cache.new
end

Public Instance Methods

refresh(base=nil, skip_callbacks=false) click to toggle source
# File lib/fssm/state/directory.rb, line 11
def refresh(base=nil, skip_callbacks=false)
  base_path = FSSM::Pathname.for(base || @path.to_pathname).expand_path
  previous, current = recache(base_path)

  unless skip_callbacks
    deleted(previous, current)
    created(previous, current)
    modified(previous, current)
  end
end