Skip to main content

SSHSCP

Cliente SCP utilizado com o SSH.


close​


close() : void​

Description​

Closes the SCP current session.

Return​

( void )


closed​


closed() : boolean​

Description​

Checks if the SCP session is still open.

Return​

( boolean )

True if it is open.


download​


download(remotePath: string, destination: OutputStream) : SSHSCP​

Description​

Copies a server file to a local file.

Attributes​
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
destinationOutputStreamLocal file of destination to store the remote content.
Return​

( SSHSCP )

The current SFTP client.


download(remotePath: string, destination: File) : SSHSCP​

Description​

Copies a server file to a local file.

Attributes​
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
destinationFileLocal file of destination to store the remote content.
Return​

( SSHSCP )

The current SFTP client.


downloadBytes​


downloadBytes(remotePath: string) : byte[]​

Description​

Obtain a byte array as content from a file server.

Attributes​
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
Return​

( byte[] )

Byte array with the remote file content in the server.


downloadText​


downloadText(remotePath: string) : string​

Description​

Obtain a text content of a server file.

Attributes​
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
Return​

( string )

Text content of the remote file in the server.


downloadText(remotePath: string, charset: string) : string​

Description​

Obtain a text content of a server file.

Attributes​
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
charsetstringEncoding code of the characters.
Return​

( string )

Text content of the remote file in the server.


isClosed​


isClosed() : boolean​

Description​

Checks if the SCP session is still open.

Return​

( boolean )

True if it is open.


upload​


upload(remotePath: string, source: InputStream) : SSHSCP​

Description​

Sends the file data to be saved in a server file.

Attributes​
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
sourceInputStreamLocal file as the source.
Return​

( SSHSCP )

The current SFTP client.


upload(remotePath: string, source: File) : SSHSCP​

Description​

Sends the file data to be saved in a server file.

Attributes​
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
sourceFileLocal file as the source.
Return​

( SSHSCP )

The current SFTP client.


uploadBytes​


uploadBytes(remotePath: string, bytes: byte[]) : SSHSCP​

Description​

Sends a byte array to be saved in a server file.

Attributes​
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
bytesbyte[]Array of bytes.
Return​

( SSHSCP )

The current SFTP client.


uploadText​


uploadText(remotePath: string, text: string) : SSHSCP​

Description​

Sends a text content to be saved in a server file.

Attributes​
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
textstringText content.
Return​

( SSHSCP )

The current SFTP client.


uploadText(remotePath: string, text: string, charset: string) : SSHSCP​

Description​

Sends a text content to be saved in a server file.

Attributes​
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
textstringText content.
charsetstringEncoding code of the characters.
Return​

( SSHSCP )

The current SFTP client.