| 1 |
\name{mimeTypeExtensions} |
| 2 |
\alias{mimeTypeExtensions} |
| 3 |
\docType{data} |
| 4 |
\title{Mapping from extension to MIME type} |
| 5 |
\description{ |
| 6 |
This is a programmatically generated character vector |
| 7 |
whose names identify the MIME type typically associated with |
| 8 |
the extension which are the values. |
| 9 |
This is used in \code{\link[RCurl]{guessMIMEType}}. |
| 10 |
We can match an extension and then find the corresponding |
| 11 |
MIME type. |
| 12 |
There are duplicates. |
| 13 |
} |
| 14 |
\usage{data(mimeTypeExtensions)} |
| 15 |
\format{ |
| 16 |
The format is a named character vector |
| 17 |
where the names are the MIME types |
| 18 |
and the values are the file |
| 19 |
extensions. |
| 20 |
} |
| 21 |
\source{ |
| 22 |
The table of MIME types and extensions was programmatically extracted |
| 23 |
from \samp{http://www.webmaster-toolkit.com/mime-types.shtml} with |
| 24 |
\code{ |
| 25 |
tbls = readHTMLTable("http://www.webmaster-toolkit.com/mime-types.shtml") |
| 26 |
tmp = tbls[[1]][-1,] |
| 27 |
mimeTypeExtensions = structure(as.character(tmp[[2]]), names = gsub("^\\.", "", tmp[[1]])) |
| 28 |
save(mimeTypeExtensions, file = "data/mimeTypeExtensions.rda") |
| 29 |
} |
| 30 |
The IANA list is not as convenient to programmatically compile. |
| 31 |
%\url{http://www.ltsw.se/knbase/internet/mime.htp} |
| 32 |
} |
| 33 |
%\references{} |
| 34 |
\examples{ |
| 35 |
data(mimeTypeExtensions) |
| 36 |
} |
| 37 |
\keyword{datasets} |