https://github.com/yihui/mime
Map filenames to MIME types
https://github.com/yihui/mime
mime-types r
Last synced: 7 days ago
JSON representation
Map filenames to MIME types
- Host: GitHub
- URL: https://github.com/yihui/mime
- Owner: yihui
- Created: 2014-04-15T22:42:30.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2025-03-17T21:02:31.000Z (28 days ago)
- Last Synced: 2025-04-04T16:52:18.469Z (10 days ago)
- Topics: mime-types, r
- Language: R
- Homepage: https://git.yihui.org/mime/
- Size: 87.9 KB
- Stars: 33
- Watchers: 5
- Forks: 15
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - yihui/mime - Map filenames to MIME types (R)
README
## mime
[](https://github.com/yihui/mime/actions)
[](https://cran.r-project.org/package=mime)This is an R package for mapping filename extensions to [MIME
types](https://en.wikipedia.org/wiki/Internet_media_type), based on the data
[derived](https://github.com/yihui/mime/blob/main/tools/update.R) from
`/etc/mime.types`.``` r
# installation
install.packages('mime')library(mime)
guess_type(c('a/b/c.html', 'd.pdf', 'e.odt', 'foo.docx', 'tex'))
# [1] "text/html"
# [2] "application/pdf"
# [3] "application/vnd.oasis.opendocument.text"
# [4] "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
# [5] "text/x-tex"
```