Method: ZK::Client::Unixisms#rm_rf

Defined in:
lib/zk/client/unixisms.rb

#rm_rf(paths) ⇒ Object

recursively remove all children of path then remove path itself



50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/zk/client/unixisms.rb', line 50

def rm_rf(paths)
  Array(paths).flatten.each do |path|
    begin
      children(path).each do |child|
        rm_rf(File.join(path, child))
      end

      delete(path)
      nil
    rescue NoNode
    end
  end
end