The file type should be set before a file is opened or created on
the server. Once the file type is set, it is in effect for all
files that are subsequently opened or created. Some methods, such as
OpenDirectory and GetText, will temporarily change
the default file type to FILE_TYPE_ASCII and then restore the current
file type when they return.
Calling this method has no practical effect when connected to an
SFTP (SSH) server. They do not differentiate between text and binary
files and the default file type will always be FILE_TYPE_IMAGE. If
your application is uploading or downloading a text file, this
difference between FTP and SFTP is important because the operating
system that hosts the server may have different end-of-line character
conventions than the client system. For example, if you download a
text file from a UNIX system using SFTP, the end-of-line is indicated
by a single linefeed (LF) character. However, on the Windows platform,
the end-of-line is indicated by a carriage-return and linefeed
sequence (CRLF).
The GetFileType method can be used to determine the
current file type. To determine the transfer file type for a specific
file, use the GetAutoFileType method.