TransferFlags Enumeration

[C/C++]

enum FlowSshC_TransferFlags
{
  FlowSshC_TransferFlags_Binary    = 0x00,
  FlowSshC_TransferFlags_AutoLf    = 0x01,
  FlowSshC_TransferFlags_AutoStd   = 0x02, // SFTPv4+
  FlowSshC_TransferFlags_Text      = 0x03, // SFTPv4+
  FlowSshC_TransferFlags_TextLf    = 0x04,
  FlowSshC_TransferFlags_Resume    = 0x10,
  FlowSshC_TransferFlags_Overwrite = 0x20,
  FlowSshC_TransferFlags_Move      = 0x40,
  FlowSshC_TransferFlags_AutoMkDir = 0x80
};

[C#]

public enum TransferFlags
{
  Binary    = 0x00,
  AutoLf    = 0x01,
  AutoStd   = 0x02, // SFTPv4+
  Text      = 0x03, // SFTPv4+
  TextLf    = 0x04,
  Resume    = 0x10,
  Overwrite = 0x20,
  Move      = 0x40,
  AutoMkDir = 0x80
}

Members

  • Binary: Transfer files without any modifications in SFTP binary mode.
  • AutoLf: Detects text files and applies client-side newline conversions. When a text file is detected, works same as TextLf mode. When a binary file is detected, works same as Binary mode.
  • AutoStd: Detects text files and applies server-side newline conversions. When downloading, uses the server's text hint to determine whether to use Binary or Text mode. If text hint is unavailable or is holding a guessed value, the file is opened in SFTP binary mode and tested for text content same way as in AutoLf mode. If text is detected, the file is re-opened in SFTP text mode. When uploading Windows text files, this mode is the same as Text mode. When uploading other files, it is the same as Binary mode. Requires SFTP version 4 or higher.
  • Text: No auto-detection of file type. Uses SFTP text mode to apply server-side newline conversions to all files. Requires SFTP version 4 or higher.
  • TextLf: No auto-detection of file type. Applies client-side newline conversions to all files. When downloading, converts UNIX newlines to Windows format (LF to CRLF). When uploading, converts Windows newlines to UNIX format (CRLF to LF). As far as the server can tell, the files are transferred as binary.
  • Resume: Resume file download/upload.
  • Overwrite: Overwrite existing file. When both Resume and Overwrite are set, Resume takes precedence.
  • Move: If enabled, the source file will be erased upon a successfully completed transfer.
  • AutoMkDir: Automatically create the missing directory structure for the target file.

Remarks

A bitflag enumeration used with the [ClientSftpChannel]Download and [ClientSftpChannel]Upload requests. It specifies the transfer mode.