ContentType Namespace Reference
Functions | |
String | fromFileExtension (const char *extension) |
Obtain content type string from file extension. More... | |
static String | fromFileExtension (const String &extension) |
Obtain content type string from file extension. More... | |
String | toString (enum MimeType m) |
Get textual representation for a MIME type. More... | |
MimeType | fromString (const char *str) |
Get enumerated value for a MIME type string. More... | |
MimeType | fromString (const String &str) |
Get enumerated value for a MIME type string. More... | |
String | fromFullFileName (const char *fileName) |
Obtain content type string from file name or path, with extension. More... | |
static String | fromFullFileName (const String &fileName) |
Obtain content type string from file name or path, with extension. More... | |
Function Documentation
◆ fromFileExtension() [1/2]
String ContentType::fromFileExtension | ( | const char * | extension | ) |
Obtain content type string from file extension.
- Parameters
-
extension excluding '.' separator (e.g. "htm", "json")
- Return values
-
String
◆ fromFileExtension() [2/2]
◆ fromFullFileName() [1/2]
String ContentType::fromFullFileName | ( | const char * | fileName | ) |
Obtain content type string from file name or path, with extension.
- Parameters
-
fileName
- Return values
-
String
◆ fromFullFileName() [2/2]
Obtain content type string from file name or path, with extension.
- Parameters
-
fileName
- Return values
-
String
◆ fromString() [1/2]
MimeType ContentType::fromString | ( | const char * | str | ) |
Get enumerated value for a MIME type string.
- Parameters
-
str
- Return values
-
MimeType If empty, null or unrecognised returns MIME_UNKNOWN
◆ fromString() [2/2]
Get enumerated value for a MIME type string.
- Parameters
-
str
- Return values
-
MimeType If empty, null or unrecognised returns MIME_UNKNOWN