aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compat/pathname.rb
blob: 58888f0174d575fcde3d92952705e63dfdac9b2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class Pathname
  def cp(dst)
    odeprecated "Pathname#cp", "FileUtils.cp"
    if file?
      FileUtils.cp to_s, dst
    else
      FileUtils.cp_r to_s, dst
    end
    dst
  end

  def chmod_R(perms)
    odeprecated "Pathname#chmod_R", "FileUtils.chmod_R"
    require "fileutils"
    FileUtils.chmod_R perms, to_s
  end
end