Back to product page

TransferMode property


Determines if transfer is ASCII or binary.

Type

TransferModes enumeration value.

Syntax

  • C#
  • VB.NET
TransferModes TransferMode {get; set; };

Property TransferMode As TransferModes

Remarks

TransferMode property is a client-side add-on (by default SFTP protocol does not make a difference between ASCII and BINARY transfer modes) property. When set to Binary, wodSFTP.NET will not interfere with the file content sent or received from the server. However, if set to ASCII then wodSFTP.NET 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 both on remote and local side.

This property makes sense only if remote system is UNIX or similar OS. If server is also Windows based, you should make no translation because both systems use same sequences to mark EOL (end-of-line). However, UNIX systems don't use CRLF (carriage-return-line-feed) but only LF (line-feed).

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

Resume property can cause trouble when used in ASCII mode because most probably resume will occur on different places on local/remote side.

Platforms

Windows