Internet Direct (Indy) Version 9.0.1 Beta
TIdTCPConnection.WriteFile
Sends an operating system file to the peer on the connection.

function WriteFile(AFile: String; const AEnableTransferFile: boolean): cardinal; virtual;
Parameters
AFile: String
File to send.

const AEnableTransferFile: boolean = False
Use OS-specific extenstions to send the file. Default value is False.

Returns
Cardinal - Number of bytes written to the peer.

Description
WriteFile is a Cardinal function used to send the operatinf system file specified in AFile to the peer on the connection. WriteFile is used to transfer files in server implementations like HTTP and FTP.

When AEnableTransferFile is True, Windows NT and Windows 2000 server can increase the efficiency of tile transfer operations, but cannot support TIdIntercept or progress indicators. AEnableTransferFile has no effect on Windows 95 and Windows 98.

WriteFile calls WriteStream using a TFileStream for the file specified in AFile to perform write operations over the connection.