code: public static Try<List<Path>> listFiles(final Path directory) {
          return Try.of(() -> Files.newDirectoryStream(directory))
                    .map(ds -> StreamSupport.stream(ds.spliterator(), false))
                    .map(ps -> ps.collect(Collectors.toList()));
      }
docs: Returns a stream from the files in the given directory. Simple wrapper around {@link DirectoryStream}.
  
  @param directory The directory to iterate over
  
  @return A stream of the files under the given directory or an empty stream if the {@link Path} was not a
  directory.