public void putFileOnFtpWithContents()

in pekko-connectors-sample-rotate-logs-to-ftp/src/main/java/playground/filesystem/FileSystemMock.java [76:87]


  public void putFileOnFtpWithContents(String path, String fileName, byte[] fileContents) {
    try {
      Path baseDir = getFileSystem().getPath(path);
      if (!Files.exists(baseDir)) {
        Files.createDirectories(baseDir);
      }
      Path filePath = baseDir.resolve(fileName);
      Files.write(filePath, fileContents);
    } catch (Throwable t) {
      throw new RuntimeException(t);
    }
  }