You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.0 KiB

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/guess-content-type.R
\title{Guess MIME type from filename (extension)}
guess_content_type(path, not_found = "???", custom_db = NULL)
\item{path}{path to file}
\item{not_found}{MIME type to use when the content cannot be guessed by
file type.}
3 years ago
\item{custom_db}{a single data frames each with two columns:
\code{mime_type} and \code{extension}. These sources will be used along with
the built-in sources and will take priority over the built-in sources.
Note that the \code{extension}s should be lower case as they are in the
official MIME database.}
character vector
Uses an internal database of over 1,800 file extension-to-MIME mappings to
return one or more associated types for a given input path. If no match is
found, \code{???} is returned.
3 years ago
guess_content_type(system.file("extdat", "pass-through", "test.pdf", package="wand"))