Module: EacFs::Utils
- Defined in:
- lib/eac_fs/utils.rb
Class Method Summary collapse
Class Method Details
.remove_empty_directories(root_path) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/eac_fs/utils.rb', line 6 def remove_empty_directories(root_path) return unless root_path.directory? root_path.children.each { |child_path| remove_empty_directories(child_path) } root_path.rmdir if root_path.empty? end |