Flowdock
method

rm_r

Importance_2
Ruby latest stable (v2_5_5) - 0 notes - Class: FileUtils
  • 1_8_6_287
  • 1_8_7_72
  • 1_8_7_330
  • 1_9_1_378
  • 1_9_2_180
  • 1_9_3_125
  • 1_9_3_392
  • 2_1_10
  • 2_2_9
  • 2_4_6
  • 2_5_5
  • 2_6_3 (0)
  • What's this?

Method not available on this version

This method is only available on newer versions. The first available version of the method is shown here.

rm_r(list, force: nil, noop: nil, verbose: nil, secure: nil) private

remove files list[0] list[1]… If list[n] is a directory, removes its all contents recursively. This method ignores StandardError when :force option is set.

Bundler::FileUtils.rm_r Dir.glob('/tmp/*')
Bundler::FileUtils.rm_r 'some_dir', :force => true

WARNING: This method causes local vulnerability if one of parent directories or removing directory tree are world writable (including /tmp, whose permission is 1777), and the current process has strong privilege such as Unix super user (root), and the system has symbolic link. For secure removing, read the documentation of #remove_entry_secure carefully, and set :secure option to true. Default is :secure=>false.

NOTE: This method calls #remove_entry_secure if :secure option is set. See also #remove_entry_secure.

Show source
Register or log in to add new notes.