lib/markdown-helpers/doc_tree_builder.rb
# empty == no subdirectories with .md files
empty == no subdirectories with .md files
empty == no subdirectories with . md files
def empty_directory?(directory)
    Dir.entries(directory).each do |filename|
      next if ignore_file?(filename, directory)
      return false if filename.include?('.md')
      path = File.join(directory, filename)
      return false if File.directory?(path) && !empty_directory?(path)
    end
    return true
  end
def empty_directory? ( directory ) Dir . entries ( directory ) . each do | filename | next if ignore_file? ( filename , directory ) return false if filename . include? ( '.md' ) path = File . join ( directory , filename ) return false if File . directory? ( path ) && ! empty_directory? ( path ) end return true end
empty == no subdirectories with .md files
empty == no subdirectories with . md files
directory
<not_specific>