def read_directories(dir = "")
      base = site.in_source_dir(dir)

      dot = Dir.chdir(base) { filter_entries(Dir.entries("."), base) }
      dot_dirs = dot.select { |file| File.directory?(@site.in_source_dir(base, file)) }
      dot_files = (dot - dot_dirs)
      dot_pages = dot_files.select do |file|
        Utils.has_yaml_header?(@site.in_source_dir(base, file))
      end
      dot_static_files = dot_files - dot_pages

      retrieve_posts(dir)
      retrieve_dirs(base, dir, dot_dirs)
      retrieve_pages(dir, dot_pages)
      retrieve_static_files(dir, dot_static_files)
    end
def read_directories(dir = "")
      base = site.in_source_dir(dir)

      dot = Dir.chdir(base) { filter_entries(Dir.entries("."), base) }
      dot_dirs = dot.select { |file| File.directory?(@site.in_source_dir(base, file)) }
      dot_files = (dot - dot_dirs)
      dot_pages = dot_files.select do |file|
        Utils.has_yaml_header?(@site.in_source_dir(base, file))
      end
      dot_static_files = dot_files - dot_pages

      retrieve_posts(dir)
      retrieve_dirs(base, dir, dot_dirs)
      retrieve_pages(dir, dot_pages)
      retrieve_static_files(dir, dot_static_files)
    end
Recursively traverse directories to find pages and static files
 that will become part of the site according to the rules in
 filter_entries.

 dir - The String relative path of the directory to read. Default: ''.

 Returns nothing.