ruby-changes:72159
From: Burdette <ko1@a...>
Date: Tue, 14 Jun 2022 22:52:35 +0900 (JST)
Subject: [ruby-changes:72159] 9b9cc8ad34 (master): [ruby/fileutils] [DOC] More on paths and lists (https://github.com/ruby/fileutils/pull/86)
https://git.ruby-lang.org/ruby.git/commit/?id=9b9cc8ad34 From 9b9cc8ad34fdecdede439f14c027c5eefef5541e Mon Sep 17 00:00:00 2001 From: Burdette Lamar <BurdetteLamar@Y...> Date: Tue, 14 Jun 2022 08:52:18 -0500 Subject: [ruby/fileutils] [DOC] More on paths and lists (https://github.com/ruby/fileutils/pull/86) * More on paths and lists https://github.com/ruby/fileutils/commit/c3d92d34f4 --- lib/fileutils.rb | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 9b1a26ce5c..81c5e31f76 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -336,7 +336,7 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L336 # # Creates directories at the paths in the given +list+ - # (an array of strings or a single string), + # (a single path or an array of paths), # also creating ancestor directories as needed; # returns +list+ if it is an array, <tt>[list]</tt> otherwise. # @@ -412,7 +412,7 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L412 # # Removes directories at the paths in the given +list+ - # (an array of strings or a single string); + # (a single path or an array of paths); # returns +list+, if it is an array, <tt>[list]</tt> otherwise. # # Argument +list+ or its elements @@ -464,7 +464,8 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L464 # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link]. # - # Arguments +src+ and +dest+ + # Arguments +src+ (a single path or an array of paths) + # and +dest+ (a single path) # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments]. # # When +src+ is the path to an existing file @@ -531,7 +532,8 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L532 # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link]. # - # Arguments +src+ and +dest+ + # Arguments +src+ (a single path or an array of paths) + # and +dest+ (a single path) # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments]. # # If +src+ is the path to a directory and +dest+ does not exist, @@ -615,7 +617,8 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L617 # Creates {symbolic links}[https://en.wikipedia.org/wiki/Symbolic_link]. # - # Arguments +src+ and +dest+ + # Arguments +src+ (a single path or an array of paths) + # and +dest+ (a single path) # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments]. # # When +src+ is the path to an existing file: @@ -750,7 +753,8 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L753 # Copies files from +src+ to +dest+. # - # Arguments +src+ and +dest+ + # Arguments +src+ (a single path or an array of paths) + # and +dest+ (a single path) # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments]. # # If +src+ is the path to a file and +dest+ is not the path to a directory, @@ -991,7 +995,8 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L995 end module_function :copy_stream - # Moves files from +src+ to +dest+. + # Moves files from +src+ (a single path or an array of paths) + # to +dest+ (a single path). # If +src+ and +dest+ are on different devices, # first copies, then removes +src+. # @@ -1087,7 +1092,8 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L1092 alias move mv module_function :move - # Removes entries at the paths in the given +list+; + # Removes entries at the paths in the given +list+ + # (a single path or an array of paths) # returns +list+, if it is an array, <tt>[list]</tt> otherwise. # # Argument +list+ or its elements @@ -1147,7 +1153,7 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L1153 module_function :safe_unlink # Removes entries at the paths in the given +list+ - # (an array of strings or a single string); + # (a single path or an array of paths); # returns +list+, if it is an array, <tt>[list]</tt> otherwise. # # Argument +list+ or its elements @@ -1596,6 +1602,7 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L1602 private_module_function :mode_to_s # Changes permissions on the entries at the paths given in +list+ + # (a single path or an array of paths) # to the permissions given by +mode+: # # - Modifies each entry that is a regular file using @@ -1694,6 +1701,7 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L1701 module_function :chmod_R # Changes the owner and group on the entries at the paths given in +list+ + # (a single path or an array of paths) # to the given +user+ and +group+: # # - Modifies each entry that is a regular file using @@ -1818,7 +1826,8 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L1826 private_module_function :fu_get_gid # Updates modification times (mtime) and access times (atime) - # of the entries given by the paths in +list+; + # of the entries given by the paths in +list+ + # (a single path or an array of paths); # by default, creates an empty file for any path to a non-existent entry. # # Argument +list+ or its elements -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/