Transaction System API

FtpRequest

Other API in Package

Transaction

Internal Transaction

Method Summary
boolean changeFolder(String folder)

Changes to the specified folder.

boolean connect(String connectorName)

Connects using a pre-configured FTP/FTPS/SFTP Connector.

boolean connect(String type, String host, int port, String username, String password, String defaultFolder, String connectionType, int lowDataPort, int highDataPort)

Connects using the specified parameters. This method is a convenience method for development purposes. For security best practices, don't store remote server credentials in the Pal.

boolean createFolder(String folder)

Creates a folder in the current folder

boolean deleteFile(String filename)

Deletes the specified file. Returns false if the file does not exist or cannot be deleted.

boolean deleteFolder(String folder, boolean recursive)

Deletes the specified folder (and all subfolder if recursive is true). Returns false if the folder does not exist or cannot be deleted.

  disconnect()

Terminates the connection.

String getCurrentFolder()

Returns current directory

File getFile(String filename, boolean deleteRemoteFile)

Gets the specified file.

File[] getFiles(int limit, boolean deleteRemoteFile)

Gets the specified files in the current directory (limit = max files to retrieve, 0 = no limit).

UnknownFile getUnknownFile(String filename, boolean deleteRemoteFile)

Gets the specified file. Returns null if its size exceeds the max size allowed by the key.

DataList listFiles(int limit)

Lists the files and folders in this folder. Type will be 'file' or 'folder'. The entries '.' and '..' are included in the list. Names that are not Latin-1 (for example Cyrillic or Japanese) are supported on SFTP and on FTP/FTPS servers that support UTF-8.

boolean putFile(File file)

Puts the specified file in the current remote directory. 4MB is the minimum limit. Files over 4MB are controlled by the activation key max export setting.

  setConnectTimeout(int connectTimeout)

Sets how long to wait for the server to accept the connection, in seconds. Call this before calling connect(). Default is 10 seconds, the maximum is 30. A host name that does not resolve or a server that refuses the connection fails at once; this limit applies to a server that does not answer at all.

  setPrivateKey(String key, String keyPassword)

Supplies a private key for connecting to a server. Call this before calling connect(). This will over-ride any private key in a connector.

String toString()

Returns a description of this object.

  useLegacy(boolean legacy)
⚠Deprecated since 12-02-2020. The legacy libraries have been removed. This method now throws an exception; remove the call.

No longer supported: the legacy connectivity libraries have been removed. Calling this method throws an exception.

Method Detail


boolean changeFolder(String folder)

Changes to the specified folder.

Parameters:

  • String   folder Required parameter.

Returns:  boolean

Since: 05-25-2011

top

boolean connect(String connectorName)

Connects using a pre-configured FTP/FTPS/SFTP Connector.

Parameters:

  • String   connectorName Required parameter.

Returns:  boolean

Since: 05-25-2011

top

boolean connect(String type, String host, int port, String username, String password, String defaultFolder, String connectionType, int lowDataPort, int highDataPort)

Connects using the specified parameters. This method is a convenience method for development purposes. For security best practices, don't store remote server credentials in the Pal.

Parameters:

  • String   type Required parameter. Allowed values: ftp, ftps, sftp.
  • String   host Required parameter.
  • int   port Required parameter.
  • String   username
  • String   password
  • String   defaultFolder
  • String   connectionType Allowed values: explicit, implicit.
  • int   lowDataPort
  • int   highDataPort

Returns:  boolean

Since: 05-25-2011

top

boolean createFolder(String folder)

Creates a folder in the current folder

Parameters:

  • String   folder Required parameter.

Returns:  boolean

Since: 09-01-2016

top

boolean deleteFile(String filename)

Deletes the specified file. Returns false if the file does not exist or cannot be deleted.

Parameters:

  • String   filename Required parameter.

Returns:  boolean

Since: 05-25-2011

top

boolean deleteFolder(String folder, boolean recursive)

Deletes the specified folder (and all subfolder if recursive is true). Returns false if the folder does not exist or cannot be deleted.

Parameters:

  • String   folder Required parameter.
  • boolean   recursive

Returns:  boolean

Since: 09-01-2016

top

disconnect()

Terminates the connection.

Since: 05-25-2011

top

String getCurrentFolder()

Returns current directory

Returns:  String

Since: 05-25-2011

top

File getFile(String filename, boolean deleteRemoteFile)

Gets the specified file.

Parameters:

  • String   filename Required parameter.
  • boolean   deleteRemoteFile Required parameter.

Returns:  File

Since: 05-25-2011

top

File[] getFiles(int limit, boolean deleteRemoteFile)

Gets the specified files in the current directory (limit = max files to retrieve, 0 = no limit).

Parameters:

  • int   limit Required parameter. Maximum allowed size of parameter: 100
  • boolean   deleteRemoteFile

Returns:  File[]

Since: 05-25-2011

top

UnknownFile getUnknownFile(String filename, boolean deleteRemoteFile)

Gets the specified file. Returns null if its size exceeds the max size allowed by the key.

Parameters:

  • String   filename Required parameter.
  • boolean   deleteRemoteFile Required parameter.

Returns:  UnknownFile

Since: 03-28-2018

top

DataList listFiles(int limit)

Lists the files and folders in this folder. Type will be 'file' or 'folder'. The entries '.' and '..' are included in the list. Names that are not Latin-1 (for example Cyrillic or Japanese) are supported on SFTP and on FTP/FTPS servers that support UTF-8.

Parameters:

  • int   limit

Returns:  DataList


DataList Name: files
DataList Fields: filename, fileSize, date, type

Since: 05-25-2011

top

boolean putFile(File file)

Puts the specified file in the current remote directory. 4MB is the minimum limit. Files over 4MB are controlled by the activation key max export setting.

Parameters:

  • File   file Required parameter.

Returns:  boolean

Since: 05-25-2011

top

setConnectTimeout(int connectTimeout)

Sets how long to wait for the server to accept the connection, in seconds. Call this before calling connect(). Default is 10 seconds, the maximum is 30. A host name that does not resolve or a server that refuses the connection fails at once; this limit applies to a server that does not answer at all.

Parameters:

  • int   connectTimeout  - Seconds to wait for the connection. Required parameter. Maximum allowed size of parameter: 30

Since: 11-18-2026

top

setPrivateKey(String key, String keyPassword)

Supplies a private key for connecting to a server. Call this before calling connect(). This will over-ride any private key in a connector.

Parameters:

  • String   key  - Key in PEM format.
  • String   keyPassword  - Password for the key. Optional, pass null if no password.

Since: 08-18-2016

top

String toString()

Returns a description of this object.

Returns:  String

Since: 05-25-2011

top

useLegacy(boolean legacy)

No longer supported: the legacy connectivity libraries have been removed. Calling this method throws an exception.

Parameters:

  • boolean   legacy Required parameter.

Since: 12-02-2020

This method has been deprecated since 12-02-2020. The legacy libraries have been removed. This method now throws an exception; remove the call.

top
Copyright © 2006 - 2026, ContractPal, Inc. All rights reserved. API Date: Nov 18, 2026 11:49 PM