summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-13 08:18:03 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-13 08:18:03 +0000
commitd583ee266bf189a8d41ee3a3469ab0334c8643fa ()
tree12db0b931e3890a7dbac647c5b9e8a3d5c3ffae3
parentdd3851d2786412de019350a11e749c56fa5a07cc (diff)
Add FileUtils#cp_lr
* lib/fileutils.rb: Add FileUtils#cp_lr. This method creates hard links of each file from directory to another directory recursively. This is based on Thomas Sawyers and Zachary Scott. [Feature #4189] [ruby-core:33820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--NEWS6
-rw-r--r--lib/fileutils.rb69
-rw-r--r--test/fileutils/test_fileutils.rb39
3 files changed, 114 insertions, 0 deletions
@@ -102,6 +102,12 @@ with all sufficient information, see the ChangeLog file or Redmine
* erb command's -S option is deprecated, which will be removed in the next version.
* Matrix
* New method:
@@ -297,6 +297,39 @@ module FileUtils
#
# :call-seq:
# FileUtils.ln_s(target, link, force: nil, noop: nil, verbose: nil)
# FileUtils.ln_s(target, dir, force: nil, noop: nil, verbose: nil)
# FileUtils.ln_s(targets, dir, force: nil, noop: nil, verbose: nil)
@@ -342,6 +375,26 @@ module FileUtils
module_function :ln_sf
#
# Copies a file content +src+ to +dest+. If +dest+ is a directory,
# copies +src+ to +dest/src+.
#
@@ -1252,6 +1305,22 @@ module FileUtils
end
end
def copy(dest)
lstat
case
@@ -449,6 +449,45 @@ class TestFileUtils < Test::Unit::TestCase
cp_r 'tmp/src', 'tmp/dest/', remove_destination: true
end if have_symlink?
def test_mv
check_singleton :mv