Module: LastDup::Helper

Included in:
LastDup, Cli
Defined in:
lib/last-dup/helper.rb

Instance Method Summary collapse

Instance Method Details

#gather_music_folders(root_folder) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/last-dup/helper.rb', line 3

def gather_music_folders(root_folder)
  music_folders = []
  Dir.glob("#{root_folder}/**/*") do |file|
    if (File.directory? file) && Dir.glob("#{file}/*.mp3").size != 0
      music_folders << file  
    end
  end
  return music_folders
end