Internet Direct (Indy)
Home
PreviousUpNext
TIdAttachmentFile.Create Constructor

Constructor for the object instance.

Pascal
constructor Create(
    Collection: TIdMessageParts; 
    const AFileName: String = ''
); reintroduce;
Parameters 
Description 
Collection 
Collection that owns the message part.
 
AFileName 
File name for the attachment. Default value is ''. 

Create is the reintroduced constructor for the object instance. 

Create calls the inherited constructor using Collection as the owner for the message part. Collection normally contains a reference to the MessageParts property for the TIdMessage instance that contains the attachment. 

FileName indicates the file on the local system to use for storage of the attachment content in the file-based message attachment. The file name portion of the FileName argument is used in the corresponding property in the file-based attachment. The complete file name (including any drive and path information) is assigned to the StoredPathName property. 

Create sets the FileIsTempFile property to False to indicate that the file is not automatically deleted when the message or attachment is freed by the application.

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.