[Lazarus] Function to get the mimetype from a file extension
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Wed May 9 14:44:46 CEST 2012
Felipe Monteiro de Carvalho wrote:
> Hello,
>
> I need this now and after some Googling I couldn't find anything. So I
> was wondering, maybe we already have this somewhere in FPC or Lazarus?
> If not it might be something to consider adding to LazUtils.
On what platform? On Windows you'd want something related to ftype/assoc
(i.e. possibly looking at the underlying registry), on some (but
possibly not all) unix desktops xdg-mime. In the latter cases it's very
much dependent on the distro providing the xdg- family of tools, and
also on there being an active desktop session (not just a remote shell).
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the Lazarus
mailing list