Did you know ... Search Documentation:
Pack prolog_library_collection -- prolog/media_type.pl
PublicShow source

Library of Media Types, based on the official Media Types as maintained by IANA, and de facto Media Types as they are used in the wild.

Media Types are a common way of denoting binary and textual content. As such, this library is useful to base sensible defaults for processing input files on, and can be used to simplify HTTP requests and aspects of serving content over HTTP.

Also tries to maintain a one-to-one mapping between Media Types and the most commonly used file name extension for files containing content in that Media Type.

 media_type(+MediaType:media_type)// is det
media_type(-MediaType:media_type)// is det
 media_type(+MediaType:media_type) is semidet
media_type(-MediaType:media_type) is multi
 media_type_encoding(+MediaType:media_type, +Encoding:atom) is semidet
media_type_encoding(+MediaType:media_type, -Encoding:atom) is semidet
 media_type_extension(+MediaType:media_type, +Extension:atom) is semidet
media_type_extension(+MediaType:media_type, -Extension:atom) is det
media_type_extension(-MediaType:media_type, +Extension:atom) is det
media_type_extension(-MediaType:media_type, -Extension:atom) is multi
 media_type_family(+MediaType:media_type, +Family:term) is semidet
media_type_family(+MediaType:media_type, -Family:term) is semidet
media_type_family(-MediaType:media_type, +Family:term) is nondet
media_type_family(-MediaType:media_type, -Family:term) is multi
 media_type_label(+MediaType:media_type, -Label:string) is det
media_type_label(-MediaType:media_type, -Label:string) is multi
 media_type_parameter(+MediaType:media_type, +Parameter:pair(atom)) is semidet
media_type_parameter(+MediaType:media_type, -Parameter:pair(atom)) is nondet
 media_type_program(+MediaType:media_type, -Program:atom, -Args:list) is nondet
media_type_program(-MediaType:media_type, -Program:atom, -Args:list) is multi
 must_be_media_type(+MediaTypes:list(media_type), +MediaType:media_type) is det