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

  def chmod_R(perms)
    opoo "Pathname#chmod_R is deprecated, use FileUtils.chmod_R"
    require "fileutils"
    FileUtils.chmod_R perms, to_s
  end
end