Read MIME Cache from file.
Constructs MimeInfoCacheFile with empty MIME Cache group.
Read MIME Cache from IniLikeReader, e.g. acquired from iniLikeFileReader or iniLikeStringReader.
Alias for easy access to "MIME Cache" group.
Access "MIME Cache" group.
string content = `[Some group] Key=Value `; assertThrown!IniLikeException(new MimeInfoCacheFile(iniLikeStringReader(content))); content = `[MIME Cache] text/plain=geany.desktop;kde4-kwrite.desktop; image/png=kde4-gwenview.desktop;gthumb.desktop; `; auto mimeInfoCache = new MimeInfoCacheFile(iniLikeStringReader(content)); assert(mimeInfoCache.appsForMimeType("text/plain").equal(["geany.desktop", "kde4-kwrite.desktop"])); assert(mimeInfoCache.appsForMimeType("image/png").equal(["kde4-gwenview.desktop", "gthumb.desktop"])); assert(mimeInfoCache.appsForMimeType("application/nonexistent").empty); content = `[MIME Cache] text/plain=geany.desktop; notmimetype=value `; assertThrown!IniLikeException(new MimeInfoCacheFile(iniLikeStringReader(content)));
Class represenation of single mimeinfo.cache file containing information about MIME type associations.