summaryrefslogtreecommitdiff
path: root/lib/fileutils.rb
diff options
context:
space:
mode:
authorBurdette Lamar <BurdetteLamar@Yahoo.com>2022-06-21 12:23:06 -0500
committergit <svn-admin@ruby-lang.org>2022-06-22 02:23:10 +0900
commitfdd1102550d375be4302ac8d2e081797de00a205 (patch)
tree0c856dd47bf0f3ed6dc07fb21b9cc369aa21b51e /lib/fileutils.rb
parent102a97e0965956632efdc619f88747dba2dda0fd (diff)
downloadruby-fdd1102550d375be4302ac8d2e081797de00a205.tar.gz
[ruby/fileutils] Clarify difference between cp_r and install (https://github.com/ruby/fileutils/pull/95)
https://github.com/ruby/fileutils/commit/94a599e69f
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r--lib/fileutils.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 2ec8346d13..1d719f6863 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -24,7 +24,7 @@ end
# - {Setting}[rdoc-ref:FileUtils@Setting].
# - {Comparing}[rdoc-ref:FileUtils@Comparing].
# - {Copying}[rdoc-ref:FileUtils@Copying].
-# - {Moving}[rdoc-ref:FileUtils@Copying].
+# - {Moving}[rdoc-ref:FileUtils@Moving].
# - {Options}[rdoc-ref:FileUtils@Options].
#
# === Creating
@@ -76,8 +76,9 @@ end
# - ::copy_stream: Copies a stream.
# - ::cp, ::copy: Copies files.
# - ::cp_lr: Recursively creates hard links.
-# - ::cp_r: Recursively copies files.
-# - ::install: Recursively copies files (with options different from ::cp_r).
+# - ::cp_r: Recursively copies files, retaining mode, owner, and group.
+# - ::install: Recursively copies files, optionally setting mode,
+# owner, and group.
#
# === Moving
#
@@ -833,6 +834,9 @@ module FileUtils
# and +dest+ (a single path)
# should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
#
+ # The mode, owner, and group are retained in the copy;
+ # to change those, use FileUtils.install instead.
+ #
# If +src+ is the path to a file and +dest+ is not the path to a directory,
# copies +src+ to +dest+:
#