guessMIMEType {RCurl} R Documentation

Infer the MIME type from a file name

Description


This function returns the MIME type, i.e. part of the value
used in the Content-Type for an HTTP request/response or in
email to identify the nature of the content. This is a string
such as "text/plain" or "text/xml" or "image/png".

The Function consults an R Object constructed by reading a
Web site Of known MIME types (Not necessarily all) And
matching the extension Of the file name To the names Of that
table.

Usage

guessMIMEType(name,
    default = "application/octet-stream");

Arguments

name

character vector of file names

default

the value to use if no MIME type is found in the table for the given file name/extension. [as string]

Details

Authors

SMRUCC genomics Institute

Value

this function returns data object of type any kind.

clr value class

Examples

 guessMIMEType(["file.json" "data.dat" "image.png" "page.html"])

[Package RCurl version 2.33.856.6961 Index]