From fdd1102550d375be4302ac8d2e081797de00a205 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Tue, 21 Jun 2022 12:23:06 -0500 Subject: [PATCH] [ruby/fileutils] Clarify difference between cp_r and install (https://github.com/ruby/fileutils/pull/95) https://github.com/ruby/fileutils/commit/94a599e69f --- lib/fileutils.rb | 10 +++++++--- 1 file 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+: #