~hrbrmstr/wand

a5ab064fa1521c50e4ca9793e2b6aa3dccd6035f — hrbrmstr 1 year, 9 months ago 096a1b9
length 1
3 files changed, 3 insertions(+), 3 deletions(-)

M DESCRIPTION
M R/get-content-type.R
M R/guess-content-type.R
M DESCRIPTION => DESCRIPTION +1 -1
@@ 14,7 14,7 @@ Description: MIME types are shorthand descriptors for
      perform curated "magic" tests as well as mapping
      MIME types from a database of over 1,800
      extension mappings.
URL: http://gitlab.com/hrbrmstr/wand
URL: https://gitlab.com/hrbrmstr/wand
BugReports: https://gitlab.com/hrbrmstr/wand/issues
Encoding: UTF-8
License: MIT + file LICENSE

M R/get-content-type.R => R/get-content-type.R +1 -1
@@ 17,7 17,7 @@
#' get_content_type(system.file("extdat", "test.pdf", package="wand"))
get_content_type <- function(path, ...) {

  path <- path.expand(path)
  path <- path.expand(path[1])
  if (!file.exists(path)) stop("File not found.", call.=FALSE)

  hdr <- readBin(path, "raw", n=1024)

M R/guess-content-type.R => R/guess-content-type.R +1 -1
@@ 19,7 19,7 @@
#' guess_content_type(system.file("extdat", "test.pdf", package="wand"))
guess_content_type <- function(path, not_found = "???", custom_db = NULL) {

  path <- path.expand(path)
  path <- path.expand(path[1])
  if (!file.exists(path)) stop("File not found.", call.=FALSE)

  if (is.null(custom_db)) {