Class: Idp::Util

Inherits:
Object
  • Object
show all
Defined in:
lib/eco_apps/utils/idp_util.rb

Class Method Summary collapse

Class Method Details

.copy(src, dest, force = true) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/eco_apps/utils/idp_util.rb', line 4

def copy(src, dest, force = true)
  if not force and File.exist?(dest)
    return false
  else
    FileUtils.mkdir_p(dest) unless File.exist?(dest)
    FileUtils.remove_dir(dest, true)
    FileUtils.cp_r(src, dest)
    return true
  end
end