ContentType Namespace Reference
Functions | |||||
MimeType | fromFileExtension (const char *extension, MimeType unknown) | ||||
Obtain MIME type value from file extension. More... | |||||
String | fromFileExtension (const char *extension) | ||||
Obtain content type string from file extension. More... | |||||
String | fromFileExtension (const String &extension) | ||||
Obtain content type string from file extension. 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... | |||||
MimeType | fromFullFileName (const char *fileName, MimeType unknown) | ||||
Obtain MIME type value from file name or path, with extension. More... | |||||
MimeType | fromFullFileName (const String &fileName, MimeType unknown) | ||||
Obtain content type string from file name or path, with extension | |||||
| |||||
String | fromFullFileName (const char *fileName) | ||||
String | fromFullFileName (const String &fileName) | ||||
Obtain content type string from file name or path, with extension. More... | |||||
Function Documentation
◆ fromFileExtension() [1/3]
Obtain MIME type value from file extension.
- Parameters
-
extension excluding '.' separator (e.g. "htm", "json") unknown Value to return if type cannot be determined
- Return values
-
MimeType
◆ fromFileExtension() [2/3]
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() [3/3]
◆ fromFullFileName() [1/4]
Obtain MIME type value from file name or path, with extension.
- Parameters
-
fileName unknown Value to return if type cannot be determined
- Return values
-
MimeType
◆ fromFullFileName() [2/4]
◆ fromFullFileName() [3/4]
String ContentType::fromFullFileName | ( | const char * | fileName | ) |
◆ fromFullFileName() [4/4]
Obtain content type string from file name or path, with extension.
◆ 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