FTP Component
Properties Methods Events Configuration Settings Errors
The FTP Component can be used to transfer files to and from FTP servers using the FTP Protocol.
Syntax
nsoftware.IPWorksEDI.Ftp
Remarks
The FTP Component supports both plaintext and SSL/TLS connections. When connecting over SSL/TLS the SSLServerAuthentication event allows you to check the server identity and other security attributes. The SSLStatus event provides information about the SSL handshake. Additional SSL related settings are also supported via the Config method.
The FTP Component implements a standard FTP client as specified in RFC 959 and RFC 1579 with the added option of SSL security (RFC 2228) in both the protocol and data channels.
The first step in using the component is specifying the RemoteHost, User and Password. The file to upload to or download from is given by the RemoteFile property. The file to download to or upload from is specified by LocalFile. The current path in the server is specified by the RemotePath property. The Passive property is especially useful if the client is behind a firewall which inhibits incoming connections to higher ports.
If LocalFile is set to something other than an empty string, then files are received in LocalFile, otherwise the data is received through the Transfer event. StartTransfer and EndTransfer are fired at the beginning and end of transmission.
The PITrail event traces the interaction between the client and the server (the FTP Protocol Interface connection).
Directory listings are received through the DirList event.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
Account | The user account to login with. |
Command | Used to send additional commands directly to the server. |
Connected | Shows whether the component is connected. |
DirList | Collection of entries resulting in the last directory listing. |
FileExists | Returns True if the file specified by RemoteFile exists on the remote server. |
FileSize | The size of the file pointed to by RemoteFile . |
FileTime | The last modification time of the file pointed to by RemoteFile . |
Firewall | A set of properties related to firewall access. |
Idle | The current status of the component. |
LastReply | The last reply from the server. |
LocalFile | The path to a local file for download/upload. If the file exists, it is overwritten. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
Overwrite | Indicates whether or not the component should overwrite files during transfer. |
Passive | Controls whether to direct the server into passive mode. Recommended if behind a firewall. |
Password | The password to log in. |
RemoteFile | The name of the remote file for uploading, downloading, etc. |
RemoteHost | The domain name or IP address of the FTP server. |
RemotePath | The current path in the FTP server. |
RemotePort | The port for the FTP service (default is 21). |
SSLAcceptServerCert | Instructs the component to unconditionally accept the server certificate that matches the supplied certificate. |
SSLCert | The certificate to be used during SSL negotiation. |
SSLEnabled | Whether TLS/SSL is enabled. |
SSLServerCert | The server certificate for the last established connection. |
SSLStartMode | Determines how the component starts the SSL negotiation. |
StartByte | The byte index in RemoteFile and LocalFile from which to start the transmission. |
Timeout | A timeout for the component. |
TransferMode | The transfer mode (ASCII or Binary). If the value is 0 (default), the initial server mode will be used. |
User | The user identifier to use for login. |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
Abort | Abort Current Upload/Download. |
Append | Append data from LocalFile to a RemoteFile on an FTP server. |
Config | Sets or retrieves a configuration setting. |
DeleteFile | Remove a file specified by FileName from an FTP server. |
DoEvents | Processes events from the internal message queue. |
Download | Download a RemoteFile from an FTP server. |
Interrupt | Interrupt the current method. |
ListDirectory | List the current directory specified by RemotePath on an FTP server. |
ListDirectoryLong | List extended directory information for RemotePath . |
Logoff | Logoff from the FTP server by posting a QUIT command. |
Logon | Logon to the FTP RemoteHost using the current User and Password . |
MakeDirectory | Create a directory on an FTP server. |
RemoveDirectory | Remove a directory specified by DirName from an FTP server. |
RenameFile | Change the name of RemoteFile to NewName . |
Reset | Reset the component. |
SetDownloadStream | Sets the stream to which the downloaded data from the server will be written. |
SetUploadStream | Sets the stream from which the component will read data to upload to the server. |
StoreUnique | Upload a file with a Unique Name to an FTP server. |
Upload | Upload a file specified by LocalFile to an FTP server. |
Event List
The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.
ConnectionStatus | Fired to indicate changes in connection state. |
DirList | Fired when a directory entry is received. |
EndTransfer | Fired when a file completes downloading/uploading. |
Error | Information about errors during data delivery. |
PITrail | Traces the commands sent to the server, and the respective replies. |
SSLServerAuthentication | Fired after the server presents its certificate to the client. |
SSLStatus | Shows the progress of the secure connection. |
StartTransfer | Fired when a file starts downloading/uploading. |
Transfer | Fired during file download/upload. |
Configuration Settings
The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.
ActiveModeIP | Allows the specification of the IP address that the server will connect to for active mode connections. |
ActiveModePORTAddress | Allows the specification of the PORT address value for active mode connections. |
AppendToLocalFile | Append downloaded files to a local file. |
ApplyFileMaskLocally | Whether to filter the directory listing locally or on the server. |
AutoSelectDataIP | Automatically select the data connection IP. |
CalculatePercentDone | Enables or Disables calculating the percent complete for downloads. |
CheckTotalEntry | Whether to ignore directory listing total lines. |
DILinger | When set to True, DI connections are terminated gracefully. |
DILingerTime | Time in seconds to have the DI connection linger. |
DirEntryPattern | Allows the use of regular expressions to parse non-standard directory entry formats. |
FileTimeFormat | The format of file time reported by the server. |
IgnoreEntries | Directory entry data to ignore. |
MaskSensitive | Masks passwords in logs. |
MaxDirEntries | Instructs component to save the amount of entries specified that are returned by the server after a ListDirectory call has been made. |
ModeZCompressionLevel | Used to specify the level of compression used. |
PortRange | Allows the specification of a port range where the component listens for active mode connections. |
PreserveFileTime | Attempts to preserve timestamps when transferring files. |
RealTimeUpload | Enables real time uploading. |
RealTimeUploadAgeLimit | The age limit in seconds when using RealTimeUpload. |
ReusePISSLSessionInDI | Whether the PI SSL session will be reused for the DI connection. |
ReuseSSLSessionInDI | Whether the SSL session will be reused for the DI connection. |
UseClearChannel | Allows for the Clear Command Channel (CCC) command. |
UseClearDataChannel | Allows for the PROT C command. |
UseEPSV | Allows extended passive mode. |
UseMLSD | Uses listings for machine processing. |
UseMLST | Uses single file listing for machine processing. |
UseModeZ | Allows compression to be used when transferring data. |
UseOldAUTHSSL | Allows use of the 'AUTH SSL' command instead of 'AUTH TLS'. |
UseProtWhenImplicit | Sends the PROT P command to the server. |
UseRemoteHostAddressForPassive | Instructs the component to use the address specified by RemoteHost when establishing a data connection. |
VirtualHostName | Sends the HOST command to the server. |
CloseStreamAfterTransfer | If true, the component will close the upload or download stream after the transfer. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallListener | If true, the component binds to a SOCKS firewall as a server (IPPort only). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseIPv6 | Whether to use IPv6. |
UseNTLMv2 | Whether to use NTLM V2. |
CACertFilePaths | The paths to CA certificate files when using Mono on Unix/Linux. |
LogSSLPackets | Controls whether SSL packets are logged when using the internal security API. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCACerts | A newline separated list of CA certificate to use during SSL client authentication. |
SSLCheckCRL | Whether to check the Certificate Revocation List for the server certificate. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledCipherSuites | The cipher suite to be used in an SSL negotiation. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLEnableRenegotiation | Whether the renegotiation_info SSL extension is supported. |
SSLIncludeCertChain | Whether the entire certificate chain is included in the SSLServerAuthentication event. |
SSLNegotiatedCipher | Returns the negotiated ciphersuite. |
SSLNegotiatedCipherStrength | Returns the negotiated ciphersuite strength. |
SSLNegotiatedCipherSuite | Returns the negotiated ciphersuite. |
SSLNegotiatedKeyExchange | Returns the negotiated key exchange algorithm. |
SSLNegotiatedKeyExchangeStrength | Returns the negotiated key exchange algorithm strength. |
SSLNegotiatedVersion | Returns the negotiated protocol version. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
SSLServerCACerts | A newline separated list of CA certificate to use during SSL server certificate validation. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True. |
TLS12SupportedGroups | The supported groups for ECC. |
TLS13KeyShareGroups | The groups for which to pregenerate key shares. |
TLS13SignatureAlgorithms | The allowed certificate signature algorithms. |
TLS13SupportedGroups | The supported groups for (EC)DHE key exchange. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
BuildInfo | Information about the product's build. |
GUIAvailable | Tells the component whether or not a message loop is available for processing events. |
LicenseInfo | Information about the current license. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |