1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: assocs help.markup help.syntax io.streams.string sequences ;
10 { $description "Outputs an array where the first element is a MIME type and the rest of the array is file extensions that have that MIME type." } ;
14 { "filename" "a filename" }
15 { "mime-type" "a MIME type string" } }
16 { $description "Outputs the MIME type associtated with a path by parsing the path's file extension and looking it up in the table returned by " { $link mime-types } "." } ;
22 { $description "Outputs an " { $snippet "assoc" } " made from the data in the " { $link mime-db } " word where the keys are file extensions and the values are the corresponding MIME types." } ;
24 HELP: nonstandard-mime-types
28 { $description "A list of Factor-specific MIME types that are added to the MIME database loaded from disk." } ;
30 ARTICLE: "mime.types" "MIME types"
31 "The " { $vocab-link "mime.types" } " vocabulary loads a file of MIME types and provides a word to look up the MIME type based on a file extension." $nl
32 "Looking up a MIME type:"
33 { $subsections mime-type } ;