No known key found for this signature in database
GPG Key ID: 1D7529BE14E2BBA9
4 changed files with
4 additions and
4 deletions
-
R/get-content-type.R
-
R/guess-content-type.R
-
man/get_content_type.Rd
-
man/guess_content_type.Rd
|
|
@ -14,7 +14,7 @@ |
|
|
|
#' @return character vector |
|
|
|
#' @export |
|
|
|
#' @examples |
|
|
|
#' get_content_type(system.file("extdat", "test.pdf", package="simplemagic")) |
|
|
|
#' get_content_type(system.file("extdat", "test.pdf", package="wand")) |
|
|
|
get_content_type <- function(path) { |
|
|
|
|
|
|
|
path <- path.expand(path) |
|
|
|
|
|
@ -15,7 +15,7 @@ |
|
|
|
#' @return character vector |
|
|
|
#' @export |
|
|
|
#' @examples |
|
|
|
#' guess_content_type(system.file("extdat", "test.pdf", package="simplemagic")) |
|
|
|
#' guess_content_type(system.file("extdat", "test.pdf", package="wand")) |
|
|
|
guess_content_type <- function(path) { |
|
|
|
|
|
|
|
path <- path.expand(path) |
|
|
|
|
|
@ -23,5 +23,5 @@ Initial in-R header mapping logic borrowed from \code{MimeTypes.java} from |
|
|
|
\href{https://github.com/Servoy/servoy-client}{servoy-client} |
|
|
|
} |
|
|
|
\examples{ |
|
|
|
get_content_type(system.file("extdat", "test.pdf", package="simplemagic")) |
|
|
|
get_content_type(system.file("extdat", "test.pdf", package="wand")) |
|
|
|
} |
|
|
|
|
|
@ -24,5 +24,5 @@ Incorporates standard IANA MIME extension mappings and those from |
|
|
|
\href{https://s-randomfiles.s3.amazonaws.com/mime/allMimeTypes.json}{allMimeTypes.json}. |
|
|
|
} |
|
|
|
\examples{ |
|
|
|
guess_content_type(system.file("extdat", "test.pdf", package="simplemagic")) |
|
|
|
guess_content_type(system.file("extdat", "test.pdf", package="wand")) |
|
|
|
} |
|
|
|