get_content_type.Rd
There are a limited number of header "magic" bytes checked directly by
this function but cover quite a bit of ground. After that, guess_content_type()
is called which uses file extension-to-MIME mappings.
get_content_type(path, guess = TRUE, ...)
path | path to a file |
---|---|
guess | if |
... | passed on to |
character vector
File an issue or PR if more magic-byte-level
comparisons are required/desired. If no match is found, ???
is returned
(see guess_content_type()
for how to override this behaviour).
# NOT RUN { get_content_type(system.file("extdat", "pass-through", "test.pdf", package="wand")) # }