SSHSFTP
Cliente SFTP utilizado com o SSH.
close
close() : void
Description
Closes the SFTP current session.
Return
( void )
closed
closed() : boolean
Description
Checks if the SFTP session is still open.
Return
( boolean )
True if it is open.
createDirectories
createDirectories(remotePath: string) : SSHSFTP
Description
Creates the path of folders in the server.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | Server path where the folder structure should be created. |
Return
( SSHSFTP )
The current SFTP client.
createDirectory
createDirectory(remotePath: string) : SSHSFTP
Description
Creates a folder in the server.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | Server path where the folder should be created. |
Return
( SSHSFTP )
The current SFTP client.
deleteDirectory
deleteDirectory(remotePath: string) : SSHSFTP
Description
Deletes a folder in the server.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | Server path where the folder should be removed. |
Return
( SSHSFTP )
The current SFTP client.
deleteFile
deleteFile(remotePath: string) : SSHSFTP
Description
Deletes a file in the server.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | Server path where the file should be removed. |
Return
( SSHSFTP )
The current SFTP client.
download
download(remotePath: string, destination: OutputStream) : SSHSFTP
Description
Copies a server file to a local file.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | File path in the server. |
destination | OutputStream | Local file of destination to store the remote content. |
Return
( SSHSFTP )
The current SFTP client.
download(remotePath: string, destination: File) : SSHSFTP
Description
Copies a server file to a local file.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | File path in the server. |
destination | File | Local file of destination to store the remote content. |
Return
( SSHSFTP )
The current SFTP client.
downloadBytes
downloadBytes(remotePath: string) : byte[]
Description
Obtain a byte array as content from a file server.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | File 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
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | File 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
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | File path in the server. |
charset | string | Encoding code of the characters. |
Return
( string )
Text content of the remote file in the server.
isClosed
isClosed() : boolean
Return
( boolean )
list
list(remotePath: string) : java.util.List
Description
List of items in a server folder.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | Folder path in the server. |
Return
( java.util.List )
The list of itens into the server path.
size
size(remotePath: string) : long
Description
Obtains the file size in the server.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | Server path where the file is. |
Return
( long )
The file size.
upload
upload(remotePath: string, source: InputStream) : SSHSFTP
Description
Sends the file data to be saved in a server file.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | File path in the server. |
source | InputStream | Local file as the source. |
Return
( SSHSFTP )
The current SFTP client.
upload(remotePath: string, source: File) : SSHSFTP
Description
Sends the file data to be saved in a server file.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | File path in the server. |
source | File | Local file as the source. |
Return
( SSHSFTP )
The current SFTP client.
uploadBytes
uploadBytes(remotePath: string, bytes: byte[]) : SSHSFTP
Description
Sends a byte array to be saved in a server file.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | File path in the server. |
bytes | byte[] | Array of bytes. |
Return
( SSHSFTP )
The current SFTP client.
uploadText
uploadText(remotePath: string, text: string) : SSHSFTP
Description
Sends a text content to be saved in a server file.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | File path in the server. |
text | string | Text content. |
Return
( SSHSFTP )
The current SFTP client.
uploadText(remotePath: string, text: string, charset: string) : SSHSFTP
Description
Sends a text content to be saved in a server file.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | File path in the server. |
text | string | Text content. |
charset | string | Encoding code of the characters. |
Return
( SSHSFTP )
The current SFTP client.