iconsFileReader

Parse mime/icons or mime/generic-icons file by line ignoring empty lines and comments.

iconsFileReader
(
Range
)
(
Range byLine
)
if (
isInputRange!Range &&
is(ElementType!Range : string)
)

Return Value

Type: auto

Range of IconLine tuples.

Throws

Examples

string[] lines = ["application/x-archive:package-x-generic", "application/x-perl:text-x-script"];
auto expected = [IconLine("application/x-archive", "package-x-generic"), IconLine("application/x-perl", "text-x-script")];
assert(equal(iconsFileReader(lines), expected));

assertThrown!MimeFileException(iconsFileReader(["application/nocolon"]).array, "must throw");

Meta