public static ScpOperation getCopyFileOperation()

in deploy-runner-agent/src/main/java/jetbrains/buildServer/deployer/agent/ssh/scp/ScpOperationBuilder.java [21:35]


  public static ScpOperation getCopyFileOperation(@NotNull final File sourceFile,
                                                  @NotNull final String destinationPath) throws IOException {

    if (!sourceFile.exists()) {
      throw new IOException("Source [" + sourceFile.getAbsolutePath() + "] does not exists");
    }

    if (sourceFile.isDirectory()) {
      throw new IOException("Source [" + sourceFile.getAbsolutePath() + "] is a directory, but a file is expected");
    }

    ScpOperation fileOperation = new FileScpOperation(sourceFile);

    return doCreatePathOperation(destinationPath, fileOperation);
  }