APIdock / Ruby
/
method

chmod_R

ruby latest stable - Class: FileUtils
chmod_R(mode, list, noop: nil, verbose: nil, force: nil)
private

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.#{$$}"
# File lib/fileutils.rb, line 933
 def chmod_R(mode, list, noop: nil, verbose: nil, force: nil)
 list = fu_list(list)
 fu_output_message sprintf('chmod -R%s %s %s',
 (force ? 'f' : ''),
 mode_to_s(mode), list.join(' ')) if verbose
 return if noop
 list.each do |root|
 Entry_.new(root).traverse do |ent|
 begin
 ent.chmod(fu_mode(mode, ent.path))
 rescue
 raise unless force
 end
 end
 end
 end

AltStyle によって変換されたページ (->オリジナル) /