v2/mongodb-to-googlecloud/src/main/java/com/google/cloud/teleport/v2/mongodb/templates/MongoDbUtils.java [225:247]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private static Collection<String> getScripts(String path) throws IOException {
    MatchResult result = FileSystems.match(path);
    checkArgument(
        result.status() == Status.OK && !result.metadata().isEmpty(),
        "Failed to match any files with the pattern: " + path);

    List<String> scripts =
        result.metadata().stream()
            .filter(metadata -> metadata.resourceId().getFilename().endsWith(".js"))
            .map(Metadata::resourceId)
            .map(
                resourceId -> {
                  try (Reader reader =
                      Channels.newReader(
                          FileSystems.open(resourceId), StandardCharsets.UTF_8.name())) {
                    return CharStreams.toString(reader);
                  } catch (IOException e) {
                    throw new UncheckedIOException(e);
                  }
                })
            .collect(Collectors.toList());
    return scripts;
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



v2/mongodb-to-googlecloud/src/main/java/com/google/cloud/teleport/v2/transforms/JavascriptDocumentTransformer.java [170:192]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private static Collection<String> getScripts(String path) throws IOException {
      MatchResult result = FileSystems.match(path);
      checkArgument(
          result.status() == Status.OK && !result.metadata().isEmpty(),
          "Failed to match any files with the pattern: " + path);

      List<String> scripts =
          result.metadata().stream()
              .filter(metadata -> metadata.resourceId().getFilename().endsWith(".js"))
              .map(Metadata::resourceId)
              .map(
                  resourceId -> {
                    try (Reader reader =
                        Channels.newReader(
                            FileSystems.open(resourceId), StandardCharsets.UTF_8.name())) {
                      return CharStreams.toString(reader);
                    } catch (IOException e) {
                      throw new UncheckedIOException(e);
                    }
                  })
              .collect(Collectors.toList());
      return scripts;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



