lib/omgili_aggregator.rb
# Recursive method to clean all files and directories in the path.
Recursive method to clean all files and directories in the path.
Recursive method to clean all files and directories in the path .
def cleanup_folder(path)
  Dir.entries(path).select do |f|
    unless f == '.' || f == '..'
      if File.directory? File.join(path, f)
        cleanup_folder(File.join(path, f))
        Dir.rmdir(File.join(path, f))
      else
        File.delete(File.join(path, f))
      end
    end
  end
end
def cleanup_folder ( path ) Dir . entries ( path ) . select do | f | unless f == '.' || f == '..' if File . directory? File . join ( path , f ) cleanup_folder ( File . join ( path , f ) ) Dir . rmdir ( File . join ( path , f ) ) else File . delete ( File . join ( path , f ) ) end end end end
Recursive method to clean all files and directories in the path.
Recursive method to clean all files and directories in the path .
path
<not_specific>