Function findDefaultApplication

Find default application for given MIME type.

const(DesktopFile) findDefaultApplication(ListRange, CacheRange) (
  string mimeType,
  ListRange mimeAppsListFiles,
  CacheRange mimeInfoCacheFiles,
  IDesktopFileProvider desktopFileProvider
)
if (isForwardRange!ListRange && is(ElementType!ListRange : const(MimeAppsListFile)) && isForwardRange!CacheRange && is(ElementType!CacheRange : const(MimeInfoCacheFile)));

Parameters

NameDescription
mimeType MIME type or uri scheme handler in question.
mimeAppsListFiles Range of MimeAppsListFile objects to use in searching.
mimeInfoCacheFiles Range of MimeInfoCacheFile objects to use in searching.
desktopFileProvider Desktop file provider instance. Must be non-null.

Returns

Found DesktopFile or null if not found.

Note

You probably will need to call this function on parent MIME type if it fails for original mimeType.

See Also

Default Application