Internet Direct (Indy)
Home
PreviousUpNext
TIdAttachmentFile.FileIsTempFile Property

Indicates if the file for storing the message part can be deleted when freed.

Pascal
property FileIsTempFile: Boolean;

FileIsTempFile is a boolean property that indicates if the file in FileName and StoredPathName is a temporary file, and should be deleted when the message part is freed from the message part collection. 

Set FileIsTempFile to True if the mail client stores messages or attachment files for the account in another location, such as a user-specific directory or mail store. 

FileIsTempFile is used in Destroy to determine if the local file is deleted. 

Setting FileIsTempFile to True will permanently delete the attachment file created when the message is freed. 

 

Warning:

 

The default value for FileIsTempFile is False, as assigned in the Create constructor. But, PrepareLoadStream causes the value to be changed to True when the file stream is created for the file name specified in StoredPathName. This behavior differs from previous versions of Indy, where the file was assumed to be permanent storage for the message part. 

Make sure all content in the message or message part has been saved prior to calling Destroy for the TIdMessage or the TIdAttachmentFile.

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.