code: public static List<File> getDirectories(File path)
      {
          Check.notNull(path);
  
          return Optional.ofNullable(path.listFiles())
                         .map(files -> Arrays.asList(files)
                                             .stream()
                                             .filter(File::isDirectory)
                                             .collect(Collectors.toList()))
                         .orElseGet(Collections::emptyList);
      }
docs: Get all directories existing in the path.
  
  @param path The path to check (must not be <code>null</code>).
  @return The directories list.
  @throws LionEngineException If invalid parameter.