mimeapps

Finding associations between MIME types and applications.

Public Imports

desktopfile.file
public import desktopfile.file;
Undocumented in source.

Members

Classes

DesktopFileProvider
class DesktopFileProvider

Implementation of desktop file provider.

MimeAppsGroup
class MimeAppsGroup

IniLikeGroup subclass for easy access to the list of applications associated with given type.

MimeAppsListFile
class MimeAppsListFile

Class represenation of single mimeapps.list file containing information about MIME type associations and default applications.

MimeInfoCacheFile
class MimeInfoCacheFile

Class represenation of single mimeinfo.cache file containing information about MIME type associations. Note: Unlike MimeAppsListFile this class does not provide functions for associations update. This is because mimeinfo.cache files should be updated by update-desktop-database utility from desktop-file-utils.

Functions

findAssociatedApplications
const(DesktopFile)[] findAssociatedApplications(string mimeType, ListRange mimeAppsListFiles, CacheRange mimeInfoCacheFiles, IDesktopFileProvider desktopFileProvider)

Find associated applications for mimeType.

findDefaultApplication
const(DesktopFile) findDefaultApplication(string mimeType, ListRange mimeAppsListFiles, CacheRange mimeInfoCacheFiles, IDesktopFileProvider desktopFileProvider)

Find default application for mimeType.

findKnownAssociatedApplications
const(DesktopFile)[] findKnownAssociatedApplications(string mimeType, ListRange mimeAppsListFiles, CacheRange mimeInfoCacheFiles, IDesktopFileProvider desktopFileProvider)

Find all known associated applications for mimeType, including explicitly removed by user.

mimeAppsListFiles
MimeAppsListFile[] mimeAppsListFiles(const(string)[] paths)

Create MimeAppsListFile objects for paths.

mimeAppsListFiles
MimeAppsListFile[] mimeAppsListFiles()

ditto, but automatically read MimeAppsListFile objects from determined system paths. Note: Available only on Freedesktop.

mimeAppsListPaths
string[] mimeAppsListPaths()

Find all known mimeapps.list files locations. Found paths are not checked for existence.

mimeInfoCacheFiles
MimeInfoCacheFile[] mimeInfoCacheFiles(const(string)[] paths)

Create MimeInfoCacheFile objects for paths.

mimeInfoCacheFiles
MimeInfoCacheFile[] mimeInfoCacheFiles()

ditto, but automatically read MimeInfoCacheFile objects from determined system paths. Note: Available only on Freedesktop.

mimeInfoCachePaths
string[] mimeInfoCachePaths()

Find all known mimeinfo.cache files locations. Found paths are not checked for existence.

updateAssociations
void updateAssociations(string fileName, AssociationUpdateQuery query)

Apply query for file with fileName. This should be mimeapps.list file. If file does not exist it will be created.

updateAssociations
void updateAssociations(AssociationUpdateQuery query)

Apply query for writable mimeapps.list files. For compatibility purposes this overwrites both $XDG_CONFIG_HOME/mimeapps.list and $XDG_DATA_HOME/applications/mimeapps.list

writableMimeAppsListPaths
string[] writableMimeAppsListPaths()

Find all writable mimeapps.list files locations. Found paths are not checked for existence. Note: This function is available only on Freedesktop.

Interfaces

IDesktopFileProvider
interface IDesktopFileProvider

Interface for desktop file provider.

Structs

AssociationUpdateQuery
struct AssociationUpdateQuery

Struct used for construction of file assocation update query. This allows to reuse the same query many times or for many mimeapps.list files.

EnvGuard
struct EnvGuard
Undocumented in source.

See Also

Meta