Internet Direct (Indy)
Home
PreviousUpNext
TIdIOHandler.WriteFile Method

Writes the contents of a local file to the IOHandler.

Pascal
function WriteFile(
    const AFile: String; 
    AEnableTransferFile: Boolean = False
): Int64; virtual;
Parameters 
Description 
AFile 
File name to be sent on the IOHandler connection.
 
AEnableTransferFile 
Not used at this time. 

Cardinal - Number of bytes in the file written to the IOHandler.

WriteFile is a virtual Cardinal function used to write the entire contents of local file specified in AFile to the IOHandler. 

When AFile contains an invalid or missing file name, an EIdFileNotFound will be raised. 

WriteFile calls write using a temporary TFileStream created for reading the contents of the file in AFile. 

WriteFile returns the number of bytes found in the file stream written to the IOHandler.

Exceptions 
Description 
RSFileNotFound and the fully qualified file name. 
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.