@NotThreadSafe public class ScpCommand extends ShellCommand
Constructor and Description |
---|
ScpCommand(String remoteHost,
String fromFile,
String toFile)
Creates a remote scp command to copy a file to local.
|
ScpCommand(String remoteHost,
String fromFile,
String toFile,
boolean isDir)
Creates a remote scp command to copy a file/dir to local.
|
Modifier and Type | Method and Description |
---|---|
String |
getHostName()
Returns the remote target hostname.
|
getCommand, run, runWithOutput, toString
public ScpCommand(String remoteHost, String fromFile, String toFile)
remoteHost
- remote hostnamefromFile
- the remote filetoFile
- target location to copy topublic ScpCommand(String remoteHost, String fromFile, String toFile, boolean isDir)
remoteHost
- the remote hostnamefromFile
- the remote file/dir to copytoFile
- target path to copy toisDir
- if true, the remote file is a directorypublic String getHostName()
Copyright © 2023. All Rights Reserved.