Gets or sets the data transfer type. Make sure to set the ServerType property to the target OS first!

Namespace:  Rebex.Net
Assembly:  Rebex.Sftp (in Rebex.Sftp.dll)

Syntax

Visual Basic
Public Property TransferType As SftpTransferType
	Get
	Set
C#
public SftpTransferType TransferType { get; set; }

Field Value

The file transfer type. Default is Binary.

Remarks

This setting applies to

 Copy imageCopy Code
GetFile
,
 Copy imageCopy Code
PutFile
,
 Copy imageCopy Code
Upload
and
 Copy imageCopy Code
Download
methods. It does not apply to
 Copy imageCopy Code
GetStream
,
 Copy imageCopy Code
GetUploadStream
and
 Copy imageCopy Code
GetDownloadStream
methods (those are always binary).

When this property is set to Ascii and ServerType is set to Unix, Rebex SFTP will do this:
1. When uploading, all Windows-style CRLF end-of-line sequences in the source file are replaced with Unix-style LF sequences. 2. When downloading, all Unix-style LF end-of-line sequences are replaced with CRLF (any CRLF already in the source data are kept, which means you won't get CRCRLF).

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also