Skip to main content

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
NAMETYPEDESCRIPTION
remotePathstringPath 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
NAMETYPEDESCRIPTION
configValuesConfiguration 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
NAMETYPEDESCRIPTION
configFTPConfigDefinition 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
NAMETYPEDESCRIPTION
remotePathstringServer 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
NAMETYPEDESCRIPTION
remotePathstringServer 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
NAMETYPEDESCRIPTION
remotePathstringServer 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
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
destinationOutputStreamLocal 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
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
destinationFileLocal 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
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
destinationStorageLocal 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
NAMETYPEDESCRIPTION
remotePathstringFile 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
NAMETYPEDESCRIPTION
remotePathstringFile 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
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
charsetstringEncoding 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
NAMETYPEDESCRIPTION
enabledbooleanWhether 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
NAMETYPEDESCRIPTION
configKeystringKey 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
NAMETYPEDESCRIPTION
configFTPConfigConfiguration 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
NAMETYPEDESCRIPTION
remotePathstringFolder 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
NAMETYPEDESCRIPTION
oldPathstringPath on the server that should be renamed.
newPathstringThe destination path on the server.
Return

( FTP )

The current FTP resource.


sendCommand


_ftp.sendCommand(command: string) : int

Description

Sends a specific command.

Attributes
NAMETYPEDESCRIPTION
commandstringCommand 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
NAMETYPEDESCRIPTION
commandstringCommand that must be sent.
argsstringAdditional arguments.
Return

( int )

Command result.


sendSiteCommand


_ftp.sendSiteCommand(command: string) : FTP

Description

Send a site specific command.

Attributes
NAMETYPEDESCRIPTION
commandstringCommand 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
NAMETYPEDESCRIPTION
configFTPConfigDefinition of the new configuration.
Return

( FTP )

Current FTP object.


setEnabled


_ftp.setEnabled(enabled: boolean) : FTP

Description

Sets whether it is enabled.

Attributes
NAMETYPEDESCRIPTION
enabledbooleanWhether 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
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
sourceInputStreamLocal 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
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
sourceFileLocal 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
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
sourceStorageLocal 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
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
bytesbyte[]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
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
textstringText 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
NAMETYPEDESCRIPTION
remotePathstringFile path in the server.
textstringText content.
charsetstringEncoding code of the characters.
Return

( FTP )

The current FTP resource.