Back to product page

TransferMode property


Determines if transfers are Binary or ASCII.

Type

A TransferModesEnum enumeration. Determines ASCII or BINARY transfer.

Syntax

  • Basic
object.TransferMode [= value]
The TransferMode(object,value) syntax has these parts:
objectAn expression evaluating to an object of type wodSFTP.
valueA TransferModesEnum enumeration, as described in settings.

Remarks

The settings for value are:

Constant Value Description
Binary 0 Disconnected from server.
ASCII 1 Connecting to server.


The TransferMode property is a client-side add-on property (by default the SFTP protocol does not differentiate between ASCII and BINARY transfer modes). When set to Binary, wodSFTP will not interfere with the file content sent or received from the server. However, if set to ASCII then wodSFTP will perform CRLF -> LF translation before sending a file and LF -> CRLF translation when receiving a file. As a result, ASCII files should be readable on both remote and local sides.

If the server is Windows-based then you should not perform any translation because both local and remote systems will use the same character sequences for EOL (end-of-line). However, this property is useful when the server is running Unix, because UNIX systems don't use CRLF (carriage-return-line-feed) to indicate EOL, they just use LF (line-feed).

Please note that when receiving a file using ASCII mode, the Progress event will show false file size/position information. It will show information which is valid for the file on the remote server but once downloaded the file can be much smaller (depending of number of LF's found inside).

The Resume property can cause problems when used in ASCII mode because the effects of the translation will mean that the contents of one file at any given numerical position will no longer correspond to the contents of the opposite file at the same position.

Platforms

Windows