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 simple desktop file provider.

MimeAppsGroup
class MimeAppsGroup

inilike.file.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 given MIME type.

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

Find default application for given MIME type.

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

Find all known associated applications for given MIME type, including explicitly removed by user.

listAssociatedApplications
string[] listAssociatedApplications(string mimeType, ListRange mimeAppsListFiles, CacheRange mimeInfoCacheFiles)

List associated applications for given MIME type.

listDefaultApplications
string[] listDefaultApplications(string mimeType, ListRange mimeAppsListFiles)

List explicitily set default applications for given MIME type.

listKnownAssociatedApplications
string[] listKnownAssociatedApplications(string mimeType, ListRange mimeAppsListFiles, CacheRange mimeInfoCacheFiles)

List all known associated applications for given MIME type, 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.

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.

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.

writableMimeAppsListPaths
string[] writableMimeAppsListPaths()

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

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