code: public static List<File> getDirectoriesByName(String root) {
          if (root == null || root.length() == 0)
              return Collections.emptyList();
  
          return getDirectories(new File(root));
      }
docs: Get a list of all sub-directories (as Files) located in the provided
  directory
  
  @param root
  Starting directory
  @return List of File objects (one per sub-directory), or null
  @see File#listFiles(FileFilter)