Topic Path: Symbol Reference > Classes > TIdMimeTable Class > TIdMimeTable Methods > GetDefaultFileExt Method
TIdMimeTable.GetDefaultFileExt Method
function GetDefaultFileExt(
    const MIMEType: string
): string;
The MIME type and subtype to examine. 

String - The file extension for the MIME type, or ''.

GetDefaultFileExt is a String function used to retrieve the file extension for the case-insensitive registered MIME type specified in MIMEType. GetDefaultFileExt will call BuildCache if the value in MIMEType is not already present in the MIME type mapping table. 

The return value for GetDefaultFileExt will contain the file extension, including the '.' character, associate dwith the MIME type in MIMEType. The return value for the method can be an empty string ('') when the value in MIMEType cannot be found in the MIME type mapping after checking the cached values. 

Use AddMimeType to add a new file extension to MIME type mapping to the table. 

Use GetFileMIMEType to retrieve the MIME type for a specified file name and file extension.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.