[Overview][Classes][Procedures and functions][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Class to manage list of mime type mappings
Source position: fpmimetypes.pp line 41
type TFPMimeTypes = class(TComponent) |
||
public |
||
constructor Create(); override; |
|
Create a new instance of the TFPMimeTypes class |
destructor Destroy; override; |
|
Remove instance from memory |
procedure Clear; |
|
Clear the list of known MIME types |
procedure LoadKnownTypes; virtual; |
|
Queries the OS for a list of known MIME types |
class function GetNextExtension(); |
|
Extract an extension from an extension list as returned by GetMimeExtensions |
procedure LoadFromStream(); virtual; |
|
Load mime types from a stream in mime.types file format |
procedure LoadFromFile(); |
|
Load mime types from a file in mime.types file format |
procedure AddType(); |
|
Add a MIME type to the list. |
function GetMimeExtensions(); |
|
Get the extensions associated with a MIME type |
function GetMimeType(); |
|
Get MIME type of an extension |
function GetKnownMimeTypes(); |
|
Get a list of all known MIME types |
function GetKnownExtensions(); |
|
Get a lis of all known extensions |
end; |
|
Class to manage list of mime type mappings |
|
| | ||
| | ||
| | ||
TFPMimeTypes manages a list of MIME types.
The list of types can be initialized with the OS list of known MIME types through the LoadKnownTypes method, or a file in the standard mime.types format can be loaded through the LoadFromFile method.
The associated mime type of a file extension can be retrieved with TFPMimeTypes.GetMimeType.
|
Queries the OS for a list of known MIME types |
|
|
Load mime types from a file in mime.types file format |
|
|
Get MIME type of an extension |