get_content_type: Discover MIME type of a file based on contents

Description Usage Arguments Details Value Examples

Description

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. File an issue or PR if more magic-byte-level comparisons are required/desired. If no match is found, ??? is returned.

Usage

1

Arguments

path

path to a file

Details

Initial in-R header mapping logic borrowed from MimeTypes.java from servoy-client

Value

character vector

Examples

1
get_content_type(system.file("extdat", "test.pdf", package="wand"))

wand documentation built on July 9, 2019, 1:02 a.m.

Related to get_content_type in wand...