class DistributedFileSystemPathProvider {

  public Path newPath(Configuration configuration) {
    String randomString = randomStringFactory.newInstance();

    if (isBlank(security.getDistributedFileSystemWorkingDirectory())) {
      Path parentDirectory = getTemporaryFolder(configuration, randomString);
      return new Path(parentDirectory, GCP_KEY_NAME);
    } else {
      Path parentDirectory = new Path(security.getDistributedFileSystemWorkingDirectory(), randomString);
      return new Path(parentDirectory, GCP_KEY_NAME);
    }

  }

  @Autowired public  DistributedFileSystemPathProvider(GCPSecurity security, RandomStringFactory randomStringFactory);

}