[Overview][Classes][Procedures and functions][Index] Reference for unit 'fpmimetypes' (#fcl)

TFPMimeTypes

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class to manage list of mime type mappings

Declaration

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;

Inheritance

TFPMimeTypes

  

Class to manage list of mime type mappings

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject

Description

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.

See also

TFPMimeTypes.LoadKnownTypes

  

Queries the OS for a list of known MIME types

TFPMimeTypes.LoadFromFile

  

Load mime types from a file in mime.types file format

TFPMimeTypes.GetMimeType

  

Get MIME type of an extension


Documentation generated on: May 14 2021