FTP
FTP client feature.
abort
_ftp.abort() : FTP
Description
Abort the current data transfer operation
Return
( FTP )
The current FTP resource.
changeToParentDirectory
_ftp.changeToParentDirectory() : FTP
Description
Switches to the previous folder where it should be used to perform operations.
Return
( FTP )
The current FTP resource.
changeWorkingDirectory
_ftp.changeWorkingDirectory(remotePath: string) : FTP
Description
Defines the remote path that should be used to perform operations.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | Path on the server to perform the work. |
Return
( FTP )
The current FTP resource.
close
_ftp.close() : void
Description
Closes the FTP connection to the server.
Return
( void )
config
_ftp.config() : FTPConfig
Description
Starts a new configuration of its own.
Return
( FTPConfig )
Configuration object loaded from received data.
_ftp.config(config: Values) : FTPConfig
Description
Starts a new configuration of its own.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
config | Values | Configuration definition data structure. |
Return
( FTPConfig )
Configuration object loaded from received data.
_ftp.config(config: FTPConfig) : FTP
Description
Define outra configuração que deve ser utilizada.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
config | FTPConfig | Definition of the new configuration. |
Return
( FTP )
Current FTP object.
connect
_ftp.connect() : FTP
Description
Starts connecting to the server via FTP.
Return
( FTP )
The current FTP resource.
createDirectory
_ftp.createDirectory(remotePath: string) : FTP
Description
Creates a folder in the server.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | Server path where the folder should be created. |
Return
( FTP )
The current FTP resource.
deleteDirectory
_ftp.deleteDirectory(remotePath: string) : FTP
Description
Deletes a folder in the server.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | Server path where the folder should be removed. |
Return
( FTP )
The current FTP resource.
deleteFile
_ftp.deleteFile(remotePath: string) : FTP
Description
Deletes a file in the server.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | Server path where the file should be removed. |
Return
( FTP )
The current FTP resource.
disconnect
_ftp.disconnect() : FTP
Description
Performs FTP disconnection from the server.
Return
( FTP )
The current FTP resource.
download
_ftp.download(remotePath: string, destination: OutputStream) : FTP
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
( FTP )
The current FTP resource.
_ftp.download(remotePath: string, destination: File) : FTP
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
( FTP )
The current FTP resource.
_ftp.download(remotePath: string, destination: Storage) : FTP
Description
Copies a server file to a local file.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | File path in the server. |
destination | Storage | Local file of destination to store the remote content. |
Return
( FTP )
The current FTP resource.
downloadBytes
_ftp.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
_ftp.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.
_ftp.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.
enabled
_ftp.enabled() : boolean
Return
( boolean )
_ftp.enabled(enabled: boolean) : FTP
Description
Sets whether it is enabled.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
enabled | boolean | Whether it is active or inactive. |
Return
( FTP )
Current FTP object.
getClient
_ftp.getClient() : org.netuno.psamata.ftp.FTPClient
Description
Gets the base FTP client.
Return
( org.netuno.psamata.ftp.FTPClient )
Original base FTP client
getConfig
_ftp.getConfig() : FTPConfig
Description
Gets the configuration that is being used.
Return
( FTPConfig )
Object of the active configuration.
getWorkingDirectory
_ftp.getWorkingDirectory() : string
Description
Gets the current remote working path where operations are being performed.
Return
( string )
The full remote path being used.
init
_ftp.init() : FTP
Description
Starts a new instance of FTP using the FTP configuration of the default
key.
Return
( FTP )
The new instance of the FTP resource based on the default
FTP configuration.
_ftp.init(configKey: string) : FTP
Description
Starts a new instance of FTP from a specific configuration.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
configKey | string | Key of the FTP configuration that will be used. |
Return
( FTP )
The new instance of the FTP resource based on the specified FTP configuration.
_ftp.init(config: FTPConfig) : FTP
Description
Starts a new instance of FTP from a configuration that is defined in its own configuration object.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
config | FTPConfig | Configuration that will be used. |
Return
( FTP )
The new instance of the FTP resource based on the defined configuration.
isEnabled
_ftp.isEnabled() : boolean
Description
Checks if it is enabled.
Return
( boolean )
Result whether or not it is activated.
list
_ftp.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.
rename
_ftp.rename(oldPath: string, newPath: string) : FTP
Description
Renames a file or folder on the server.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
oldPath | string | Path on the server that should be renamed. |
newPath | string | The destination path on the server. |
Return
( FTP )
The current FTP resource.
sendCommand
_ftp.sendCommand(command: string) : int
Description
Sends a specific command.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
command | string | Command that must be sent. |
Return
( int )
Command result.
_ftp.sendCommand(command: string, args: string) : int
Description
Sends a specific command with additional arguments required for the FTP command.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
command | string | Command that must be sent. |
args | string | Additional arguments. |
Return
( int )
Command result.
sendSiteCommand
_ftp.sendSiteCommand(command: string) : FTP
Description
Send a site specific command.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
command | string | Command that must be sent. |
Return
( FTP )
The current FTP resource.
setConfig
_ftp.setConfig(config: FTPConfig) : FTP
Description
Define outra configuração que deve ser utilizada.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
config | FTPConfig | Definition of the new configuration. |
Return
( FTP )
Current FTP object.
setEnabled
_ftp.setEnabled(enabled: boolean) : FTP
Description
Sets whether it is enabled.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
enabled | boolean | Whether it is active or inactive. |
Return
( FTP )
Current FTP object.
upload
_ftp.upload(remotePath: string, source: InputStream) : FTP
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
( FTP )
The current FTP resource.
_ftp.upload(remotePath: string, source: File) : FTP
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
( FTP )
The current FTP resource.
_ftp.upload(remotePath: string, source: Storage) : FTP
Description
Sends the file data to be saved in a server file.
Attributes
NAME | TYPE | DESCRIPTION |
---|---|---|
remotePath | string | File path in the server. |
source | Storage | Local file as the source. |
Return
( FTP )
The current FTP resource.
uploadBytes
_ftp.uploadBytes(remotePath: string, bytes: byte[]) : FTP
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
( FTP )
The current FTP resource.
uploadText
_ftp.uploadText(remotePath: string, text: string) : FTP
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
( FTP )
The current FTP resource.
_ftp.uploadText(remotePath: string, text: string, charset: string) : FTP
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
( FTP )
The current FTP resource.