Browse Source

length 1

master
boB Rudis 5 years ago
parent
commit
a5ab064fa1
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 2
      DESCRIPTION
  2. 2
      R/get-content-type.R
  3. 2
      R/guess-content-type.R

2
DESCRIPTION

@ -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

2
R/get-content-type.R

@ -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)

2
R/guess-content-type.R

@ -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)) {

Loading…
Cancel
Save