The TransferMode function is a client-side add-on function (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 ends.
This function only makes sense if the remote system is running UNIX
or a similar OS. If the server is Windows-based, you should
not translate because both systems use the same sequences
to mark EOL (end-of-line). However, UNIX systems don't
use CRLF (carriage-return-line-feed) they only use LF
(line-feed).
Please note that when receiving a file using ASCII mode, the
Progress
callback will show false information regarding file
size/position. It will show information which is valid for
a file on the remote server, but when downloaded it can be much
smaller (depending of number of LF's it contains).
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