docs: public static List<File> getDirectories(File root) {
          if (root == null)
              return Collections.emptyList();
  
          FileFilter filter = new DirsOnlyFilter();
  
          File fileList[] = root.listFiles(filter);
  
          if (fileList == null)
              return Collections.emptyList();
          else
              return Arrays.asList(fileList);
      }