Learn R Programming

wand (version 0.5.0)

guess_content_type: Guess MIME type from filename (extension)

Description

Uses an internal database of over 1,500 file extension-to-MIME mappings to return one or more associated types for a given input path. If no match is found, ??? is returned.

Usage

guess_content_type(path)

Arguments

path

path to file

Value

character vector

Details

Incorporates standard IANA MIME extension mappings and those from servoy-client and stevenwdv's allMimeTypes.json.

Examples

Run this code
# NOT RUN {
guess_content_type(system.file("extdat", "test.pdf", package="wand"))
# }

Run the code above in your browser using DataLab