# dev.inmo.micro_utils.mime_types

# Package-level declarations

## Types

CustomMimeType
Link copied to clipboard
data class CustomMimeType (val raw: String ) : MimeType
KnownMimeTypes
Link copied to clipboard
@Serializable(with = MimeTypeSerializer::class )
sealed class KnownMimeTypes : MimeType
MimeType
Link copied to clipboard
@Serializable(with = MimeTypeSerializer::class )
interface MimeType
MimeTypeSerializer
Link copied to clipboard
@Serializer(forClass = MimeType::class )
object MimeTypeSerializer : KSerializer< MimeType >

## Properties

knownMimeTypesMap
Link copied to clipboard
val knownMimeTypesMap : Map < String , MimeType >
mimeTypesByExtensions
Link copied to clipboard
val mimeTypesByExtensions : Map < String , Array < MimeType >>

## Functions

findBuiltinMimeType
Link copied to clipboard
fun findBuiltinMimeType (from: String ): MimeType ?
getMimeType
Link copied to clipboard
inline fun getMimeType (stringWithExtension: String , selector: ( Array < MimeType >) -> MimeType ? = { it.firstOrNull() }): MimeType ?
getMimeTypeOrAny
Link copied to clipboard
inline fun getMimeTypeOrAny (stringWithExtension: String , selector: ( Array < MimeType >) -> MimeType ? = { it.firstOrNull() }): MimeType
mimeType
Link copied to clipboard
fun mimeType (raw: String ): MimeType