type static method
Implementation
static Future<String> type(String path, {String defaultType = ""}) async {
String type;
try {
if (!_libraryLoaded) {
await mime.loadLibrary();
_libraryLoaded = true;
}
type = mime.lookupMimeType(path) ?? defaultType;
} catch (e) {
type = defaultType;
}
return type;
}