diff options
author | Burdette Lamar <[email protected]> | 2022-06-10 16:41:13 -0500 |
---|---|---|
committer | git <[email protected]> | 2022-06-11 06:41:27 +0900 |
commit | 44b3daa0d7784319b42a12066f793bfa5fe2b3a1 () | |
tree | 6392a0276e66b97f7f43324622182690958863c3 /lib/fileutils.rb | |
parent | fc484be5e5a1e9fcdc74871106dbe13ba533b745 (diff) |
[ruby/fileutils] Enhanced RDoc (https://.com/ruby/fileutils/pull/83)
Treats ::chmod_R and ::chown. https://.com/ruby/fileutils/commit/df4ac84bef
-rw-r--r-- | lib/fileutils.rb | 76 |
1 files changed, 63 insertions, 13 deletions
@@ -1579,6 +1579,7 @@ module FileUtils # # FileUtils.chmod('u=wrx,go=rx', 'src1.txt') # FileUtils.chmod('u=wrx,go=rx', '/usr/bin/ruby') # Keyword arguments: # # - <tt>noop: true</tt> - does not change permissions; returns +nil+. @@ -1606,12 +1607,7 @@ module FileUtils end module_function :chmod - # - # Changes permission bits on the named files (in +list+) - # to the bit pattern represented by +mode+. - # - # FileUtils.chmod_R 0700, "/tmp/app.#{$$}" - # FileUtils.chmod_R "u=wrx", "/tmp/app.#{$$}" # def chmod_R(mode, list, noop: nil, verbose: nil, force: nil) list = fu_list(list) @@ -1631,15 +1627,69 @@ module FileUtils end module_function :chmod_R # - # Changes owner and group on the named files (in +list+) - # to the user +user+ and the group +group+. +user+ and +group+ - # may be an ID (Integer/String) or a name (String). - # If +user+ or +group+ is nil, this method does not change - # the attribute. # - # FileUtils.chown 'root', 'staff', '/usr/local/bin/ruby' - # FileUtils.chown nil, 'bin', Dir.glob('/usr/bin/*'), verbose: true # def chown(user, group, list, noop: nil, verbose: nil) list = fu_list(list) |