diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-04 12:29:55 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-04 12:29:55 +0000 |
commit | 46adb2803d1c3ceeb9083a3238e529d0b5ebc4b5 (patch) | |
tree | ac2477f3fbbb71f54c7de4108ff1d9b37710de07 /lib | |
parent | eea9a0890eee50f51adca9860b316671d5d1e940 (diff) | |
download | ruby-46adb2803d1c3ceeb9083a3238e529d0b5ebc4b5.tar.gz ruby-46adb2803d1c3ceeb9083a3238e529d0b5ebc4b5.tar.xz ruby-46adb2803d1c3ceeb9083a3238e529d0b5ebc4b5.zip |
* lib/fileutils.rb: (In previous commit) new method chown.
* lib/fileutils.rb: (In previous commit) new method chown_R.
* lib/fileutils.rb: (In previous commit) new method chmod_R wrongly added. Removed now.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fileutils.rb | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 9684ebf31..34efc4d85 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -806,30 +806,8 @@ module FileUtils # # Options: noop verbose # - # Changes permission bits on the named files and directories (in +list+) - # to the bit pattern represented by +mode+. - # - # FileUtils.chmod 0700, '/home/test/.ssh', :verbose => true - # - def chmod_R(mode, list, options = {}) - fu_check_options options, :noop, :verbose - list = fu_list(list) - fu_output_message sprintf('chmod -R %o %s', - mode, list.join(' ')) if options[:verbose] - return if options[:noop] - list.each do |prefix| - Find.find(prefix) do |path| - File.chmod mode, path - end - end - end - - - # - # Options: noop verbose - # # Changes owner and group on the named files (in +list+) - # to the user +user+ and the group +group. +user+ and +group+ + # 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. @@ -852,13 +830,13 @@ module FileUtils # Options: noop verbose # # 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. + # to the user +user+ and the group +group+ recursively. + # +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.chmod_R 'www', 'www', '/var/www/htdocs' - # FileUtils.chmod_R 'cvs', 'cvs', '/var/cvs', :verbose => true + # FileUtils.chown_R 'www', 'www', '/var/www/htdocs' + # FileUtils.chown_R 'cvs', 'cvs', '/var/cvs', :verbose => true # def chown_R(mode, list, options = {}) fu_check_options options, :noop, :verbose @@ -1038,7 +1016,6 @@ module FileUtils 'cd' => %w( noop verbose ), 'chdir' => %w( noop verbose ), 'chmod' => %w( noop verbose ), - 'chmod_R' => %w( noop verbose ), 'chown' => %w( noop verbose ), 'chown_R' => %w( noop verbose ), 'copy' => %w( noop verbose preserve ), |