rm_r
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (-38)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
rm_r(list, force: nil, noop: nil, verbose: nil, secure: nil)
public
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.
FileUtils.rm_r Dir.glob('/tmp/*') 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.