Class Scp
- All Implemented Interfaces:
AutoCloseable
Transfer files, text, and binary data over SCP using an existing SSH connection.
Chilkat.Scp is the Chilkat class for SCP file transfer over an
already-established Chilkat.Ssh connection. It supports
local-file upload and download, in-memory binary transfer, encoded binary
transfer, text transfer with explicit character sets, BinData
transfer, directory-tree synchronization, sync filtering, remote UNIX
permission overrides, environment variables, progress scaling, abort support,
and asynchronous task integration.
Uses an SSH connection
Attach Scp to an authenticated Chilkat.Ssh
session rather than opening a separate network connection.
Upload and download files
Transfer local files to remote paths or download remote files to the local filesystem using SCP.
Memory-based transfers
Upload or download binary data, encoded data, text, or
Chilkat.BinData without requiring temporary files.
Directory synchronization
Synchronize directory trees and use filtering options to include or exclude selected files.
Remote file options
Set remote UNIX permissions, pass environment variables, and control transfer-related behavior required by the remote server.
Progress and async support
Monitor progress, scale progress percentages, abort active transfers, and run supported operations as asynchronous tasks.
Common pattern:
Connect and authenticate with Chilkat.Ssh, initialize
Chilkat.Scp with that SSH connection, then upload, download, or
synchronize the desired files or in-memory data. Use Scp for
SCP-style transfers over SSH; use Chilkat.SFtp when the remote
server expects the SFTP protocol instead.
For an extended overview, see Scp Class Overview.
</section>
Event-capable: long-running methods report progress through a ProgressListener installed
with setProgressListener(ProgressListener), onAbortCheck(BooleanSupplier),
onPercentDone(IntPredicate) or onProgressInfo(BiConsumer).
Instances hold a native Chilkat object: close them with ChilkatObject.close() (try-with-resources) when
done; an unclosed instance is freed when it becomes unreachable.
- See Also:
- Online reference
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddownloadBd(String remotePath, BinData bd)Downloads the file atremotePathand appends its exact bytes to the existing contents of theBinDataobject inbd.downloadBinaryEncoded(String remotePath, String encoding)Downloads the file atremotePathand returns its bytes encoded as text using the binary encoding named byencoding, such asbase64orhex.voiddownloadFile(String remotePath, String localPath)Downloads the file atremotePathfrom the SSH server and writes its bytes to the local filesystem path inlocalPath.downloadString(String remotePath, String charset)Downloads the file atremotePath, decodes its bytes using the character encoding named bycharset, and returns the resulting text.booleanSet totrueto request cancellation of the method currently executing on this object.intSpecifies the interval, in milliseconds, betweenevent callbacks during supported long-running operations.AbortCheckintSpecifies the value that represents 100% completion inPercentDoneevent callbacks.Returns the installed listener, ornull.Specifies environment variables to send for each SCP upload or download.Contains the local paths of the files transferred by the most recent call toorsyncTreeUpload(String, String, int, boolean).syncTreeDownload(String, String, int, boolean)Specifies a semicolon-separated list of wildcard patterns for filenames that are eligible for transfer byandsyncTreeUpload(String, String, int, boolean).syncTreeDownload(String, String, int, boolean)Specifies a semicolon-separated list of wildcard patterns for directory names that may be traversed byandsyncTreeUpload(String, String, int, boolean).syncTreeDownload(String, String, int, boolean)Specifies a semicolon-separated list of wildcard patterns for filenames that must be skipped byandsyncTreeUpload(String, String, int, boolean).syncTreeDownload(String, String, int, boolean)Specifies a semicolon-separated list of wildcard patterns for directory names that must not be traversed byandsyncTreeUpload(String, String, int, boolean).syncTreeDownload(String, String, int, boolean)Provides a comma-separated list of specialized compatibility options.Specifies an octal UNIX permission mode to apply to files uploaded by SCP, overriding the permissions derived from the local source file.voidonAbortCheck(BooleanSupplier callback)Installs a listener whose only callback isabortCheck: called everyHeartbeatMsmilliseconds during a long-running method; returntrueto abort it.voidonPercentDone(IntPredicate callback)Installs a listener whose only callback ispercentDone: called with the completion percentage (0..100) as a long-running method progresses; returntrueto abort it.voidonProgressInfo(BiConsumer<String,String> callback)Installs a listener whose only callback isprogressInfo: called with a name/value pair of progress information as a long-running method proceeds.voidsetAbortCurrent(boolean value)Sets theAbortCurrentproperty; seegetAbortCurrent().voidsetHeartbeatMs(int value)Sets theHeartbeatMsproperty; seegetHeartbeatMs().voidsetPercentDoneScale(int value)Sets thePercentDoneScaleproperty; seegetPercentDoneScale().voidsetProgressListener(ProgressListener listener)Installs the listener that receives this object's progress events (abortCheck,percentDone,progressInfo) during its long-running methods; replaces any listener or lambda installed before;nullremoves it.voidsetSendEnv(String value)Sets theSendEnvproperty; seegetSendEnv().voidsetSyncedFiles(String value)Sets theSyncedFilesproperty; seegetSyncedFiles().voidsetSyncMustMatch(String value)Sets theSyncMustMatchproperty; seegetSyncMustMatch().voidsetSyncMustMatchDir(String value)Sets theSyncMustMatchDirproperty; seegetSyncMustMatchDir().voidsetSyncMustNotMatch(String value)Sets theSyncMustNotMatchproperty; seegetSyncMustNotMatch().voidsetSyncMustNotMatchDir(String value)Sets theSyncMustNotMatchDirproperty; seegetSyncMustNotMatchDir().voidsetUncommonOptions(String value)Sets theUncommonOptionsproperty; seegetUncommonOptions().voidsetUnixPermOverride(String value)Sets theUnixPermOverrideproperty; seegetUnixPermOverride().voidsyncTreeDownload(String remoteRoot, String localRoot, int mode, boolean bRecurse)Synchronizes files from the remote directory tree rooted atremoteRootto the local directory rooted atlocalRoot.voidsyncTreeUpload(String localBaseDir, String remoteBaseDir, int mode, boolean bRecurse)Synchronizes files from the local directory tree rooted atlocalBaseDirto the remote directory rooted atremoteBaseDir.voidUploads all bytes currently contained in theBinDataobject inbdto the remote file atremotePath.voiduploadBinaryEncoded(String remotePath, String encodedData, String encoding)Decodes the text inencodedDatausing the binary encoding named byencoding, then uploads the resulting bytes to the remote file atremotePath.voiduploadFile(String localPath, String remotePath)Uploads the local filesystem file atlocalPathto the remote path inremotePath.voiduploadString(String remotePath, String textData, String charset)Encodes the text intextDatausing the character encoding named bycharset, then uploads the resulting bytes to the remote file atremotePath.voidAssociates thisScpobject with the connected and authenticatedSshobject insshConnection.Methods inherited from class com.chilkatsoft.chilkat2.ChilkatObject
close, getDebugLogFilePath, getLastErrorHtml, getLastErrorText, getLastErrorXml, getLastMethodSuccess, getVerboseLogging, getVersion, isClosed, setDebugLogFilePath, setLastMethodSuccess, setVerboseLogging, toString
-
Constructor Details
-
Scp
public Scp()Creates a newScpobject.
-
-
Method Details
-
getAbortCurrent
public boolean getAbortCurrent()Set totrueto request cancellation of the method currently executing on this object. Long-running network and file-transfer operations check this property periodically; a method that completes quickly may finish before the request is observed.Both synchronous and asynchronous operations can be cancelled. To cancel a synchronous call, set this property from another thread on the same
Scpobject. Chilkat resets the property tofalseafter the cancellation is processed. If no method is running, a previously set value is cleared when the next method begins.Cooperative cancellation: This property requests an abort; it does not forcibly terminate a thread. Use the method return value,
LastMethodSuccesswhere applicable, andLastErrorTextto determine the final outcome.- Returns:
- the value of the
AbortCurrentproperty
-
setAbortCurrent
public void setAbortCurrent(boolean value)Sets theAbortCurrentproperty; seegetAbortCurrent().- Parameters:
value- the new value
-
getHeartbeatMs
public int getHeartbeatMs()Specifies the interval, in milliseconds, betweenevent callbacks during supported long-running operations. The callback allows the application to report activity or request cancellation before the operation completes.AbortCheckThe default value is
0, which disables periodicAbortCheckcallbacks.Event-callback setting: This property is useful only in programming environments that support Chilkat event callbacks. It is not an SSH keep-alive interval and does not change connection or read timeouts.
- Returns:
- the value of the
HeartbeatMsproperty
-
setHeartbeatMs
public void setHeartbeatMs(int value)Sets theHeartbeatMsproperty; seegetHeartbeatMs().- Parameters:
value- the new value
-
getPercentDoneScale
public int getPercentDoneScale()Specifies the value that represents 100% completion inPercentDoneevent callbacks. The default is100, which reports progress in whole-percent units. For example, when the scale is1000, a callback value of453represents 45.3% completion.The value is limited to the range
10through100000. Increasing the scale provides finer numeric granularity for operations whose progress can be measured.Event-callback setting: This property applies only in programming environments that support Chilkat event callbacks. A larger scale changes the meaning and possible granularity of callback values; it does not guarantee that every intermediate value will be reported.
- Returns:
- the value of the
PercentDoneScaleproperty
-
setPercentDoneScale
public void setPercentDoneScale(int value)Sets thePercentDoneScaleproperty; seegetPercentDoneScale().- Parameters:
value- the new value
-
getSendEnv
Specifies environment variables to send for each SCP upload or download. Set the property to a JSON object whose member names are environment-variable names and whose values are strings.{ "LCS_PASSWORD": "myPassword", "SOME_ENV_VAR": "some_value" }Server policy controls acceptance: SCP transfers run through SSH channels. The SSH server may accept, reject, or ignore requested environment variables according to its configuration. Do not assume that setting this property guarantees that the remote SCP process receives every variable. Sensitive values: Environment variables can contain secrets, but they are not a substitute for SSH authentication. Avoid exposing sensitive values in application logs or diagnostic output.
- Returns:
- the value of the
SendEnvproperty
-
setSendEnv
Sets theSendEnvproperty; seegetSendEnv().- Parameters:
value- the new value (notnull)
-
getSyncMustMatch
Specifies a semicolon-separated list of wildcard patterns for filenames that are eligible for transfer byandsyncTreeUpload(String, String, int, boolean). A file is considered only when its filename matches at least one pattern.syncTreeDownload(String, String, int, boolean)For example,
*.xml;*.txt;*.csvlimits synchronization to XML, text, and CSV files. The default empty string imposes no include restriction.Pattern scope: Patterns are matched against the final filename, not the full local or remote path. Directory traversal is controlled separately by
andgetSyncMustMatchDir().getSyncMustNotMatchDir()- Returns:
- the value of the
SyncMustMatchproperty
-
setSyncMustMatch
Sets theSyncMustMatchproperty; seegetSyncMustMatch().- Parameters:
value- the new value (notnull)
-
getSyncMustMatchDir
Specifies a semicolon-separated list of wildcard patterns for directory names that may be traversed byandsyncTreeUpload(String, String, int, boolean). When this property is nonempty, synchronization descends only into directories whose names match at least one pattern.syncTreeDownload(String, String, int, boolean)For example,
a*;b*;c*permits traversal into directories whose names begin witha,b, orc. The default empty string permits traversal into all directories, subject to.getSyncMustNotMatchDir()Pattern scope: Each pattern is matched against the directory name itself, not its complete path. This property affects traversal; it does not directly select individual files.
- Returns:
- the value of the
SyncMustMatchDirproperty
-
setSyncMustMatchDir
Sets theSyncMustMatchDirproperty; seegetSyncMustMatchDir().- Parameters:
value- the new value (notnull)
-
getSyncMustNotMatch
Specifies a semicolon-separated list of wildcard patterns for filenames that must be skipped byandsyncTreeUpload(String, String, int, boolean).syncTreeDownload(String, String, int, boolean)For example,
*.tmp;*.bak;*.logexcludes temporary, backup, and log files. The default empty string excludes no files.Pattern scope: Patterns are matched against the final filename, not the full path. Use
to prevent synchronization from entering selected directories and their subtrees.getSyncMustNotMatchDir()- Returns:
- the value of the
SyncMustNotMatchproperty
-
setSyncMustNotMatch
Sets theSyncMustNotMatchproperty; seegetSyncMustNotMatch().- Parameters:
value- the new value (notnull)
-
getSyncMustNotMatchDir
Specifies a semicolon-separated list of wildcard patterns for directory names that must not be traversed byandsyncTreeUpload(String, String, int, boolean). A matching directory and everything below it are skipped.syncTreeDownload(String, String, int, boolean)For example,
temp*;cache*;.gitprevents traversal into temporary, cache, and Git metadata directories. The default empty string excludes no directories.Pattern scope: Each pattern is matched against the directory name itself, not its complete path. This setting is especially useful during recursive synchronization because excluding a directory avoids scanning its entire subtree.
- Returns:
- the value of the
SyncMustNotMatchDirproperty
-
setSyncMustNotMatchDir
Sets theSyncMustNotMatchDirproperty; seegetSyncMustNotMatchDir().- Parameters:
value- the new value (notnull)
-
getSyncedFiles
Contains the local paths of the files transferred by the most recent call toorsyncTreeUpload(String, String, int, boolean). Paths are listed one per line.syncTreeDownload(String, String, int, boolean)- After an upload, each line is the full local path of a source file that was uploaded.
- After a download, each line is the full local path of a destination file that was downloaded.
Local paths only: This property reports local filesystem paths, not remote paths. It lists files actually transferred by the last synchronization operation, rather than every file examined during comparison.
- Returns:
- the value of the
SyncedFilesproperty
-
setSyncedFiles
Sets theSyncedFilesproperty; seegetSyncedFiles().- Parameters:
value- the new value (notnull)
-
getUncommonOptions
Provides a comma-separated list of specialized compatibility options. The default is the empty string, which is appropriate for normal SCP transfers.Keyword Behavior
FilenameOnlyUses only the filename, rather than the complete target path, in the remotescp -tcommand. This option exists for compatibility with systems such as certain LANCOM routers.ProtectFromVpnOn Android, attempts to route the SCP connection outside an installed or active VPN.Leave empty unless needed: These options alter uncommon platform or server compatibility behavior. Enable a keyword only when a Chilkat example, release note, or support response identifies it as necessary for the target environment.
- Returns:
- the value of the
UncommonOptionsproperty
-
setUncommonOptions
Sets theUncommonOptionsproperty; seegetUncommonOptions().- Parameters:
value- the new value (notnull)
-
getUnixPermOverride
Specifies an octal UNIX permission mode to apply to files uploaded by SCP, overriding the permissions derived from the local source file. For example, set this property to0644to grant read/write permission to the owner and read-only permission to the group and others.The default is the empty string, which causes the uploaded file's remote permissions to be based on the local file's permissions.
UNIX permission notation: Supply the mode as a string containing octal digits, such as
0600,0644, or0755. The remote SSH account must still have permission to create or replace the file, and server-side policy may restrict the final mode.- Returns:
- the value of the
UnixPermOverrideproperty
-
setUnixPermOverride
Sets theUnixPermOverrideproperty; seegetUnixPermOverride().- Parameters:
value- the new value (notnull)
-
downloadBd
Downloads the file atremotePathand appends its exact bytes to the existing contents of theBinDataobject inbd.An absolute remote path begins with
/. A relative path is interpreted relative to the authenticated SSH user's home directory.Append behavior: This method does not clear
bdbefore downloading. Clear theBinDataobject first when the downloaded file should replace, rather than follow, its current contents.- Parameters:
remotePath- theremotePathargument (notnull)bd- thebdargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
downloadBinaryEncoded
Downloads the file atremotePathand returns its bytes encoded as text using the binary encoding named byencoding, such asbase64orhex.An absolute remote path begins with
/. A relative path is interpreted relative to the authenticated SSH user's home directory.Binary encoding versus charset:
encodingselects a text representation of arbitrary bytes; it is not a character set and does not decode the remote file as text. Usewhen the remote file contains text that must be decoded with a charset. Memory use: The complete file and its encoded representation are held in memory. Encodings such as Base64 also increase the amount of data returned.downloadString(String, String)- Parameters:
remotePath- theremotePathargument (notnull)encoding- theencodingargument (notnull)- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
downloadFile
Downloads the file atremotePathfrom the SSH server and writes its bytes to the local filesystem path inlocalPath.An absolute remote path begins with
/. A relative remote path is interpreted relative to the authenticated SSH user's home directory. The application must have permission to create or replace the local destination file.Streaming transfer: This method is the preferred download method for large files because the data is written to disk rather than returned as one in-memory byte array or string.
- Parameters:
remotePath- theremotePathargument (notnull)localPath- thelocalPathargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
downloadString
Downloads the file atremotePath, decodes its bytes using the character encoding named bycharset, and returns the resulting text.An absolute remote path begins with
/. A relative path is interpreted relative to the authenticated SSH user's home directory.Charset matters:
charsetdescribes how the remote file’s bytes represent characters, for exampleutf-8,windows-1252, oriso-8859-1. Using the wrong charset can produce incorrect characters. Use a binary download method for files that are not text.- Parameters:
remotePath- theremotePathargument (notnull)charset- thecharsetargument (notnull)- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
syncTreeDownload
Synchronizes files from the remote directory tree rooted atremoteRootto the local directory rooted atlocalRoot.bRecursecontrols recursion: set it totrueto descend into subdirectories, orfalseto process only files directly in the root directory.An absolute remote root begins with
/; a relative remote root is interpreted relative to the authenticated SSH user's home directory. A relative local root is interpreted relative to the application's current working directory.Mode Files transferred
0Download every eligible file.1Download files that do not already exist locally.2Download files that are missing locally or whose remote last-modified time is newer than the local file.3Download only files whose remote last-modified time is newer. A remote file that has no local counterpart is not downloaded.5Download files that are missing locally or whose size differs from the local file.6Download files that are missing locally, differ in size, or have a newer remote last-modified time.The filename and directory filters in
,getSyncMustMatch(),getSyncMustNotMatch(), andgetSyncMustMatchDir()are applied during traversal. After completion,getSyncMustNotMatchDir()lists the full local paths of files actually downloaded.getSyncedFiles()Timestamp-based modes: Modes
2,3, and6compare last-modified times. Incorrect server timestamps or clock differences between systems can affect which file is considered newer.- Parameters:
remoteRoot- theremoteRootargument (notnull)localRoot- thelocalRootargument (notnull)mode- themodeargumentbRecurse- thebRecurseargument- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
syncTreeUpload
Synchronizes files from the local directory tree rooted atlocalBaseDirto the remote directory rooted atremoteBaseDir.bRecursecontrols recursion: set it totrueto descend into subdirectories, orfalseto process only files directly in the local base directory.A relative local base directory is interpreted relative to the application's current working directory. An absolute remote base directory begins with
/; a relative remote base directory is interpreted relative to the authenticated SSH user's home directory.Mode Files transferred
0Upload every eligible file.1Upload files that do not already exist on the remote server.2Upload files that are missing remotely or whose local last-modified time is newer than the remote file.3Upload only files whose local last-modified time is newer. A local file that has no remote counterpart is not uploaded.4Upload files that are missing remotely or whose size differs from the remote file.5Upload files that are missing remotely, differ in size, or have a newer local last-modified time.The filename and directory filters in
,getSyncMustMatch(),getSyncMustNotMatch(), andgetSyncMustMatchDir()are applied during traversal. After completion,getSyncMustNotMatchDir()lists the full local paths of files actually uploaded.getSyncedFiles()Timestamp-based modes: Modes
2,3, and5compare last-modified times. Incorrect server timestamps or clock differences between systems can affect which file is considered newer.- Parameters:
localBaseDir- thelocalBaseDirargument (notnull)remoteBaseDir- theremoteBaseDirargument (notnull)mode- themodeargumentbRecurse- thebRecurseargument- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
uploadBd
Uploads all bytes currently contained in theBinDataobject inbdto the remote file atremotePath. The data is transferred without character decoding or other transformation.An absolute remote path begins with
/. A relative path is interpreted relative to the authenticated SSH user's home directory. The remote parent directory must already exist.Source object: The upload reads the current contents of
bdand does not remove or modify those bytes.- Parameters:
remotePath- theremotePathargument (notnull)bd- thebdargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
uploadBinaryEncoded
Decodes the text inencodedDatausing the binary encoding named byencoding, then uploads the resulting bytes to the remote file atremotePath. Typical encoding names includebase64andhex.An absolute remote path begins with
/. A relative path is interpreted relative to the authenticated SSH user's home directory. The remote parent directory must already exist.The encoded text is not uploaded literally: For example, when
encodingisbase64, Chilkat Base64-decodesencodedDataand transfers the decoded binary bytes. This method is for encoded binary representations, not character-set conversion.- Parameters:
remotePath- theremotePathargument (notnull)encodedData- theencodedDataargument (notnull)encoding- theencodingargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
uploadFile
Uploads the local filesystem file atlocalPathto the remote path inremotePath. The file is transferred as raw bytes.An absolute remote path begins with
/. A relative remote path is interpreted relative to the authenticated SSH user's home directory. The remote parent directory must already exist, and the SSH account must have permission to create or replace the destination file.Remote permissions are normally derived from the local file. Set
when a specific remote UNIX mode is required.getUnixPermOverride()SCP is not FTP: There is no ASCII or binary transfer mode.
UploadFilecopies the file bytes without line-ending or character-set conversion.- Parameters:
localPath- thelocalPathargument (notnull)remotePath- theremotePathargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
uploadString
Encodes the text intextDatausing the character encoding named bycharset, then uploads the resulting bytes to the remote file atremotePath.An absolute remote path begins with
/. A relative path is interpreted relative to the authenticated SSH user's home directory. The remote parent directory must already exist.Text encoding:
charsetcontrols how characters are converted to bytes, for exampleutf-8,windows-1252, oriso-8859-1. SCP itself has no text mode; any line-ending characters already present intextDataare encoded and transferred as part of the text.- Parameters:
remotePath- theremotePathargument (notnull)textData- thetextDataargument (notnull)charset- thecharsetargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
useSsh
Associates thisScpobject with the connected and authenticatedSshobject insshConnection. Subsequent SCP operations use that existing SSH session rather than opening a separate network connection.Connection, proxy, timeout, host-key verification, algorithm, logging, and other transport-related settings belong to the
Sshobject and therefore apply to the SCP operations performed through it. Keep the SSH object connected and available for as long as theScpobject is using it.SCP and SFTP are different protocols:
Scpperforms SCP-style transfers over SSH and requires compatible SCP support on the remote system. UseChilkat.SFtpwhen the server expects the SSH File Transfer Protocol subsystem or when directory listing and remote file-management features are needed.- Parameters:
sshConnection- thesshConnectionargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
setProgressListener
Installs the listener that receives this object's progress events (abortCheck,percentDone,progressInfo) during its long-running methods; replaces any listener or lambda installed before;nullremoves it.- Parameters:
listener- the listener, ornull- Throws:
IllegalStateException- if called from inside one of this object's own callbacks
-
getProgressListener
Returns the installed listener, ornull.- Returns:
- the listener installed with
setProgressListener(ProgressListener)or one of theon...methods
-
onAbortCheck
Installs a listener whose only callback isabortCheck: called everyHeartbeatMsmilliseconds during a long-running method; returntrueto abort it. Replaces any listener installed before.- Parameters:
callback- the callback, ornullto remove the listener
-
onPercentDone
Installs a listener whose only callback ispercentDone: called with the completion percentage (0..100) as a long-running method progresses; returntrueto abort it. Replaces any listener installed before.- Parameters:
callback- the callback, ornullto remove the listener
-
onProgressInfo
Installs a listener whose only callback isprogressInfo: called with a name/value pair of progress information as a long-running method proceeds. Replaces any listener installed before.- Parameters:
callback- the callback, ornullto remove the listener
-